[Top][All Lists]

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

Re: [Bug-tar] spurious warning in short_read

From: Mads Kiilerich
Subject: Re: [Bug-tar] spurious warning in short_read
Date: Fri, 22 May 2009 18:26:49 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b5pre) Gecko/20090513 Fedora/3.0-2.4.b3pre.hg.6a6386c16e98.fc11 Thunderbird/3.0b3pre

On 05/22/2009 02:09 PM, Samuel Thibault wrote:

Since at least tar 1.22, there is an additional warning in short_read:

   if (left&&  left % BLOCKSIZE == 0
       &&  verbose_option
       &&  record_start_block == 0&&  status != 0)
       unsigned long rsize = status / BLOCKSIZE;
       WARN ((0, 0,
              ngettext ("Record size = %lu block",
                        "Record size = %lu blocks",

Why is that done?  Reads on pipes typically return short reads, and
these are typically aligned on page size, and thus record_size (10240
here) % BLOCKSIZE is typically 0...

It has been discussed before, for example at http://www.nabble.com/tar:-Record-size-%3D-8-blocks-td22265061.html and http://www.nabble.com/record-size-%3D-x-blocks--td22477515.html

The current behaviour was introduced because it sometimes provides useful information on tape / block devices. FWIW I still don't see how any kind of semantics in read chunk sizes can ever be reliable anywhere.


reply via email to

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