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: Tue, 03 Nov 2015 12:19:00 -0000 [thread overview]
Message-ID: <20151103121910.GB18567@calimero.vinschen.de> (raw)
In-Reply-To: <22071.56848.992859.797169@compute03.cs.columbia.edu>
[-- Attachment #1: Type: text/plain, Size: 3980 bytes --]
On Nov 2 17:05, Jonathan Lennox wrote:
> On Monday, November 2 2015, "Corinna Vinschen" wrote to "cygwin@cygwin.com" saying:
>
> > On Nov 2 08:08, Jonathan Lennox wrote:
> > > On Monday, November 2 2015, "Corinna Vinschen" wrote to "cygwin@cygwin.com" saying:
> > > > I added support for this filesystem (called prlfs in mount output) and
> > > > without hardlink support for now. I uploaded a new developer snapshot
> > > > to https://cygwin.com/snapshots/ Please give it a try.
> > >
> > > No, still seeing the failure in the snapshot:
> > >
> > > $ ./stat-size-test.exe /cygdrive/y/foo ~/foo
> > > /cygdrive/y/foo: fstat: st_size=0
> > > /cygdrive/y/foo: stat: st_size=12
> > > /home/jonathan/foo: fstat: st_size=12
> > > /home/jonathan/foo: stat: st_size=12
> >
> > Weird. There should be no FileNetworkOpenInformation call anymore for
> > Netapp and the PrlSF filesystem.
> >
> > Does Cygwin correctly recognize the FS? What does `mount' print? It
> > should print `type prlfs'.
>
> $ mount
> C:/cygwin64/bin on /usr/bin type ntfs (binary,auto)
> C:/cygwin64/lib on /usr/lib type ntfs (binary,auto)
> C:/cygwin64 on / type ntfs (binary,auto)
> C: on /cygdrive/c type ntfs (binary,posix=0,user,noumount,auto)
> D: on /cygdrive/d type iso9660 (binary,posix=0,user,noumount,auto)
> E: on /cygdrive/e type iso9660 (binary,posix=0,user,noumount,auto)
> U: on /cygdrive/u type prlsf (binary,posix=0,user,noumount,auto)
> V: on /cygdrive/v type prlsf (binary,posix=0,user,noumount,auto)
> W: on /cygdrive/w type prlsf (binary,posix=0,user,noumount,auto)
> X: on /cygdrive/x type prlsf (binary,posix=0,user,noumount,auto)
> Y: on /cygdrive/y type prlsf (binary,posix=0,user,noumount,auto)
> Z: on /cygdrive/z type prlsf (binary,posix=0,user,noumount,auto)
"prlsf". If Cygwin had recognized the FS, it would have printed
"prlfs". I did this shuffle "sf" vs. "fs" on purpose. But...
> > Can you please once again call `/usr/lib/csih/getVolInfo.exe Z:' and
> > `/usr/lib/csih/getVolInfo.exe Y:' and paste the output here? I'm not
> > quite sure because the original getVolInfo call returned a filesystem
> > type of "PrlSF", not "PrlFS" as I had expected. Cygwin now checks for
> > "PrlSF".
> >
>
> $ /usr/lib/csih/getVolInfo.exe /cygdrive/z
> Device Type : 7
> Characteristics : 10
> Volume Name : <Shared Folders>
> Serial Number : 0
> Max Filenamelength : 255
> Filesystemname : <PrlSF>
> Flags : 3
> [...]
...I don't understand *why* Cygwin doesn't recognize the FS. It checks
explicitely for the "PrlSF" filesystem name. I tried this locally
by faking the above information and it worked for me.
Btw., there's more than one problem here. The fact that all drives
have the same volume name *and* a serial number of 0 leads to all
drives being identified as the same drive. I have to add some code
creating a reproducible serial number from scratch if the original
serial number is 0, but for testing, I didn't implement this yet.
Talking about testing. I created a test DLL which provides a lot
of output when stracing the calls. I'll send you a private mail
with the URL to this DLL in a minute. Please install it, and under
that DLL, run
$ strace -o stat.trace ./stat-size-test.exe /cygdrive/y/foo
I'll need to have a look into that strace to (hopefully) see what's
going wrong.
> FILE_READ_ONLY_VOLUME : FALSE
> FILE_SEQUENTIAL_WRITE_ONCE : FALSE
> FILE_SUPPORTS_TRANSACTIONS : FALSE
>
> (Note that the literal "/usr/lib/csih/getVolInfo.exe Z:" printed
> "NtOpenFile(\??\C:\cygwin64\home\jonathan\Z:) failed, c0000033", so I assume
> that's not what you want.)
Indeed. Sorry, I was thinking of one of my local test hacks using DOS
paths.
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 --]
next prev parent reply other threads:[~2015-11-03 12:19 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
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 [this message]
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=20151103121910.GB18567@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).