bug-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-tar] [RFC-Patch] --ignore-zeros for compare? (GNU tar, star and BSD


From: Jan-Benedict Glaw
Subject: [Bug-tar] [RFC-Patch] --ignore-zeros for compare? (GNU tar, star and BSD tar speed comparision +script)
Date: Mon, 22 Oct 2007 23:02:52 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

On Mon, 2007-10-22 22:51:58 +0200, Jan-Benedict Glaw <address@hidden> wrote:
> On Mon, 2007-10-22 22:34:32 +0200, Jan Psota <address@hidden> wrote:
> > bsdtar      list            0.05    0.02    0.02   1452160 KB/s
> > bsdtar      list              0.21  0.06     0.14   9960157 KB/s
> > bsdtar      list            0.01    0.00    0.01  20282000 KB/s
> > bsdtar      list              0.05  0.02     0.02  61025140 KB/s
> 
> For the rest of the tests, we see that GNU tar ist quite fast all the
> time, though there seems to be a shortcoming for the compare
> operation.

I just had a look at the sources and probably found an unrelated
glitch:

compare.c:verify_volume()

518 void
519 verify_volume (void)
520 {
[...]
579   while (1)
580     {
581       enum read_header status = read_header (false);
[...]
600       if (status == HEADER_ZERO_BLOCK || status == HEADER_END_OF_FILE)
601         break;
605     }
606 
607   access_mode = ACCESS_WRITE;
608   now_verifying = 0;
609 }

I didn't verify, but shouldn't this read like this?

--- src/compare.c~      2007-10-22 22:59:52.000000000 +0200
+++ src/compare.c       2007-10-22 23:00:46.000000000 +0200
@@ -597,7 +597,8 @@
                            "VERIFY FAILURE: %d invalid headers detected",
                            counter), counter));
        }
-      if (status == HEADER_ZERO_BLOCK || status == HEADER_END_OF_FILE)
+      if (status == HEADER_ZERO_BLOCK && ignore_zeros_option
+         || status == HEADER_END_OF_FILE)
        break;
 
       diff_archive ();


MfG, JBG

-- 
      Jan-Benedict Glaw      address@hidden              +49-172-7608481
Signature of:         Alles wird gut! ...und heute wirds schon ein biƟchen 
besser.
the second  :

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]