bug-tar
[Top][All Lists]
Advanced

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

Re: [Bug-tar] record size = x blocks?


From: Mads Kiilerich
Subject: Re: [Bug-tar] record size = x blocks?
Date: Thu, 12 Mar 2009 16:28:44 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b3pre) Gecko/20090303 Fedora/3.0-1.beta2.fc11 Thunderbird/3.0b2

On 03/12/2009 03:28 PM, Peter Fales wrote:
I see that a couple of people have asked about these messages, but I
haven't seen a response.  Can someone explain what triggers these
messages and whether it indicates some sort of problem?  They started
showing up in 1.21 and 1.22 and are responsible for several
"make check" failures in 1.22.  If the message doesn't indicate a
problem, and if there is nothing the user can do to fix it, it's
probably better to not show the message.

To rephrase my analysis so far: (Disclaimer: as one of the whiners I am slightly biased ;-) )


The change came with version 1.21:

* Bugfixes

** Fixed record size autodetection.  If detected record size differs from
the expected value (either default, or set on the command line), tar
always prints a warning if verbosity level is set to 1 or greater,
i.e. if either -t or -v option is given.

I don't know exactly what "record size" means in tar context, but for record based devices like tapes it sounds like a nice feature/bugfix.

But the implementation is that it emits warnings whenever the OS doesn't return data in the expected chunks. The problem is that the OS is free to return data in any chunk sizes it wants. Odd chunk sizes are generally non-deterministic behaviour, but it is normal behaviour and shouldn't cause a warning. IMHO!


The old option
       -B, --read-full-blocks
              reblock as we read (for reading 4.2BSD pipes)
seems to deal with almost the same issue. AFAICS tar should never be run without this option. It seems like it is automatically enabled for stdin pipe (and compressed archives). This options is however not enough to avoid the warning.


Another related option is
       -b, --blocking-factor N
              block size of Nx512 bytes (default N=20)
Setting this to 1 and specifying -B seems to work around the problem. I don't understand why. But IMHO that is a workaround, not a solution.

/Mads





reply via email to

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