Strange fstatat / stat behavour on directories causing tar "file changed as we read it" error

Steven Hartland killing@multiplay.co.uk
Sat Jan 8 02:39:00 GMT 2011


----- Original Message ----- 
From: "Eric Blake"
On 01/07/2011 11:21 AM, Steven Hartland wrote:
> 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).

FS was just NTFS, at first we thought it might be being caused by compression
being enabled on the files / directories but we confirmed the behavour
on an machine with uncompressed volumes as well.

>> 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.

Just NTFS I'm afraid nothing special.

You can see the behaviour with ls -l as well, as you would expect.

A simpler, which may help is:-
ls -l
drwxr-xr-x  1 test test           0 Oct 20 14:09 testdir
find testdir > /dev/null # lots of files
ls -l
drwxr-xr-x  1 test test        8192 Oct 20 14:09 testdir

uname -a
CYGWIN_NT-6.0-WOW64 hern4 1.7.1(0.218/5/3) 2009-12-07 11:48 i686 Cygwin

Running under Web Server 2008

    Regards
    Steve


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list