This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: fstat st_size on open files on Parallels filesystem is wrong


On Wednesday, October 21 2015, "Corinna Vinschen" wrote to "cygwin@cygwin.com" saying:

> On Oct  8 12:16, Jonathan Lennox wrote:
> > Hi, following up on this issue from last year.  The message I'm replying to
> > is at <https://cygwin.com/ml/cygwin/2014-04/msg00524.html>.
> > 
> > The problem is weird behavior in Parallels Desktop-hosted Windows VMs, when
> > accessing the host's native Mac OS X filesystem.  See the thread for the
> > details.
> > 
> > On Wednesday, April 23 2014, "Corinna Vinschen" wrote to "cygwin@cygwin.com" saying:
> > 
> > > > At this point this is looking pretty clearly like a Parallels Tools bug.
> > > > I'll report it to them.
> > > 
> > > Yes, that sounds good.  Given that, I'm wondering if we should try to
> > > workaround this problem at all or rather wait to see if the vendor will
> > > fix the issue.
> > 
> > No such luck, despite two major version revisions of Parallels Desktop (I'm
> > now on version 11.0.2) and moving to Windows 10 as the guest OS -- the bug
> > perists, unchanged.  So it looks like Cygwin will need to add a workaround
> > for this filesystem to fix the problem.
> 
> Ok, we could do that.  Can you compile and run the testcase from
> https://cygwin.com/ml/cygwin/2014-04/msg00523.html again?  Does it
> still show 0 vs. 12 bytes?  Dumb extra test: Does the output change
> if you reorder the calls, requesting FileStandardInformation first,
> FileNetworkOpenInformation second?

I re-ran the test, no change. Changing the order gives the same result --
FileStandardInformation works, FileNetworkOpenInformation doesn't.

> Just create a hardlink on that drive using native means:
> 
>   $ touch foo
>   $ cmd /c mklink /h bar foo
> 
> Error at this point?  No hardlinks.  Otherwise:

"You do not have sufficient privilege to perform this operation."  Is that
sufficient proof?

Unfortunately, when I do "Run As Administrator" on MinTTY, the Mac drives
(/cygdrive/z and /cygdrive/y) don't show up. I don't know why that is.  So I
can't test hard links as administrator.

>   $ ls -li foo bar
> 
> Are the inode numbers identical?  Congrats, hardlinks work.  But given
> the general FAT-iness of the getVolInfo output, I guess it doesn't
> maintain hardlinks.

However, when I create a hardlink on the underlying (Mac) file system, the
inode numbers that Cygwin shows are not identical.  So "no hardlinks" seems
very likely.

-- 
Jonathan Lennox
lennox at cs dot columbia dot edu

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]