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
