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

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",
                        rsize),
              rsize));
     }

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.

/Mads



Reply via email to