public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: fstat st_size on open files on Parallels filesystem is wrong
Date: Wed, 21 Oct 2015 11:07:00 -0000	[thread overview]
Message-ID: <20151021110734.GO5319@calimero.vinschen.de> (raw)
In-Reply-To: <22038.38637.802707.846218@compute03.cs.columbia.edu>

[-- Attachment #1: Type: text/plain, Size: 2605 bytes --]

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?

> The output of /usr/lib/csih/getVolInfo seems to be unchanged from the output
> I reported last year.
> 
> > Thanks.  This looks pretty much like a filesystem pretending to be
> > FAT-like.  There may be another problem lurking, which is, are the inode
> > numbers (called "FileId" or "IndexNumber" in Windows) persistant?  With
> > FAT this is not the case, and given the above, it might be a problem...
> > 
> > ...or not.  I just realize that Cygwin doesn't even try to use the
> > FileId as inode number on filesystems with FILE_PERSISTENT_ACLS==FALSE
> > so, never mind.
> > 
> > OTOH, does it support hardlinks?  If so, two hardlinks to the
> > same file would have different inode numbers on Cygwin.
> 
> How would I figure these points out?

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:

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


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2015-10-21 11:07 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-21 18:27 lennox
2014-04-21 18:35 ` Andrey Repin
2014-04-21 18:46   ` lennox
2014-04-22  8:16     ` Corinna Vinschen
2014-04-22 16:09       ` lennox
2014-04-22 20:57       ` lennox
2014-04-23  8:41         ` Corinna Vinschen
2014-04-23 16:47           ` lennox
2014-04-23 17:24             ` Corinna Vinschen
2015-10-08 16:16               ` Jonathan Lennox
2015-10-21 11:07                 ` Corinna Vinschen [this message]
2015-11-02  9:38                   ` Jonathan Lennox
2015-11-02 11:23                     ` Corinna Vinschen
2015-11-02 13:08                       ` Jonathan Lennox
2015-11-02 14:06                         ` Corinna Vinschen
2015-11-02 22:05                           ` Jonathan Lennox
2015-11-03 12:19                             ` Corinna Vinschen
2015-11-04  6:35                               ` Jonathan Lennox
2015-11-04  9:45                                 ` Corinna Vinschen
2015-11-02 12:52                     ` cyg Simple

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151021110734.GO5319@calimero.vinschen.de \
    --to=corinna-cygwin@cygwin.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).