Re: Repeat the Ending

Marty Leisner (
Tue, 10 Jun 1997 15:08:28 PDT

I complained earlier about an interaction between linux kernels
and tar from a floppy to an NFS mount
(note I have no problem doing
cat /dev/fd0 >floppy; tar -xvf floppy
tar -xvf /dev/fd0
when the cwd is a local filesystem).

Also, caching and noncaching (i.e. whether the floppy is hit or not)
behavior have the same features.

I'm not sure whether its a tar problem or a linux problem (or a problem
tar doesn't expect a kernel to have)

I have a 975k file in tar format on the floppy...

Over NFS I repeatedly get from 800k to 950k and then tar quits...
without reporting any problems

This is consistent behavior with strace:
read(4, "a\216A\21=E\231yz\n\322\307Z:\253"..., 10240) = 10240
write(5, "a\216A\21=E\231yz\n\322\307Z:\253"..., 10240) = 10240
read(4, "\344.\336\377\257\v\374\227\374\375"..., 10240) = 10240
write(5, "\344.\336\377\257\v\374\227\374\375"..., 2768) = 2768

(it always writes 2768 bytes and then closes the file -- this is premature).

I ran tar in gdb (sorry, I lost the gdb session due to a power failure)
and set breakpoints where tar read and wrote...
I was seeing the behavior shown above (read 10240, wrote 2768).

I read 10240 bytes successfully, but on the last write it had 2768 bytes
to write...I traced some of the logic unsuccessfully...(something somewhere
had to be changes 10240 to 2768 and mark end of file, but I didn't see it...)

Don't confuse education with schooling.
Milton Friedman to Yogi Berra