[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-tar] `File shrank' errors during create
From: |
Michael Teichgräber |
Subject: |
[Bug-tar] `File shrank' errors during create |
Date: |
Thu, 10 May 2007 11:45:47 +0200 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) |
Hi,
when using "tar cf" on a fuse controlled file system, I stumbled
across messages like "File shrank by 500197 bytes; padding with
zeros", with these files being skipped from the archive.
Strace showed that tar was e.g. trying to read a block of 9728
(== 0x2600) bytes, but received only 4096. The FUSE controlled file
system reduced the requested size to that value, and made read()
return 4096. (It seems a normal, kernel controlled fs doesn't have
such a limitation, or perhaps there it is at 16384 bytes)
Apparently tar treates this as an error
(tar-1.16/src/create.c:967: if (count != bufsize)).
This made me wonder whether in line 955 tar could use a function like
safe_readn instead of safe_read, so that actually n bytes would be
read unless there is an error. After temporarily adding such a
function to lib/safe-read.c tar didn't show these messages again and
seemed to create a valid archive.
Regards,
Michael
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug-tar] `File shrank' errors during create,
Michael Teichgräber <=