Strange fstatat / stat behavour on directories causing tar "file changed as we read it" error
Eric Blake
eblake@redhat.com
Sat Jan 8 00:23:00 GMT 2011
On 01/07/2011 11:21 AM, Steven Hartland wrote:
> It turns out that the value of st_size returned by a call
> to fstatat on a directory can change even though there
> have been no changes at all to said directory or its
> children.
What file system is this on? Someone else reported the same behavior
for "Samba share on QNX through Virtual PC." - if the problem is limited
to just a subset of (known-buggy) file systems, it would be nicer to
limit the workaround to just those file systems (and have st_size always
return 0 for directories from those systems).
> The attached patch fixes this strange behaviour by ignoring
> size changes for directories as well as correcting the file
> size check to also detect file shrinks as well as growths,
> which seemed very odd.
Thanks for the patch - we'll see if I can get enough free time to apply
it and ship a patched tar, or whether cygwin 1.7.8 with a better
workaround for the issue gets released first (since there was already
talk of getting 1.7.8 complete sometime this month).
>
> Is there some "meta data" caching going on in cygwin or
> Windows which causes this very strange behaviour?
Giving us more details about your filesystem would help us answer that
question.
--
Eric Blake eblake@redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://cygwin.com/pipermail/cygwin/attachments/20110108/ef4effe8/attachment.sig>
More information about the Cygwin
mailing list