From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 52099 invoked by alias); 3 Nov 2015 12:19:15 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 52088 invoked by uid 89); 3 Nov 2015 12:19:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.1 required=5.0 tests=AWL,BAYES_50,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 X-HELO: calimero.vinschen.de Received: from aquarius.hirmke.de (HELO calimero.vinschen.de) (217.91.18.234) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 03 Nov 2015 12:19:13 +0000 Received: by calimero.vinschen.de (Postfix, from userid 500) id B7105A805F0; Tue, 3 Nov 2015 13:19:10 +0100 (CET) Date: Tue, 03 Nov 2015 12:19:00 -0000 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: fstat st_size on open files on Parallels filesystem is wrong Message-ID: <20151103121910.GB18567@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <20140423084056.GJ2339@calimero.vinschen.de> <21335.61113.963950.516021@compute01.cs.columbia.edu> <20140423172413.GQ2339@calimero.vinschen.de> <22038.38637.802707.846218@compute03.cs.columbia.edu> <20151021110734.GO5319@calimero.vinschen.de> <22071.12068.858109.210047@compute03.cs.columbia.edu> <20151102112334.GC5319@calimero.vinschen.de> <22071.24647.434328.551494@compute03.cs.columbia.edu> <20151102140627.GA963@calimero.vinschen.de> <22071.56848.992859.797169@compute03.cs.columbia.edu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="1LKvkjL3sHcu1TtY" Content-Disposition: inline In-Reply-To: <22071.56848.992859.797169@compute03.cs.columbia.edu> User-Agent: Mutt/1.5.23 (2014-03-12) X-SW-Source: 2015-11/txt/msg00075.txt.bz2 --1LKvkjL3sHcu1TtY Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 3941 On Nov 2 17:05, Jonathan Lennox wrote: > On Monday, November 2 2015, "Corinna Vinschen" wrote to "cygwin@cygwin.co= m" saying: >=20 > > On Nov 2 08:08, Jonathan Lennox wrote: > > > On Monday, November 2 2015, "Corinna Vinschen" wrote to "cygwin@cygwi= n.com" saying: > > > > I added support for this filesystem (called prlfs in mount output) = and > > > > without hardlink support for now. I uploaded a new developer snaps= hot > > > > to https://cygwin.com/snapshots/ Please give it a try. > > >=20 > > > No, still seeing the failure in the snapshot: > > >=20 > > > $ ./stat-size-test.exe /cygdrive/y/foo ~/foo > > > /cygdrive/y/foo: fstat: st_size=3D0 > > > /cygdrive/y/foo: stat: st_size=3D12 > > > /home/jonathan/foo: fstat: st_size=3D12 > > > /home/jonathan/foo: stat: st_size=3D12 > >=20 > > Weird. There should be no FileNetworkOpenInformation call anymore for > > Netapp and the PrlSF filesystem. > >=20 > > Does Cygwin correctly recognize the FS? What does `mount' print? It > > should print `type prlfs'. >=20 > $ 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=3D0,user,noumount,auto) > D: on /cygdrive/d type iso9660 (binary,posix=3D0,user,noumount,auto) > E: on /cygdrive/e type iso9660 (binary,posix=3D0,user,noumount,auto) > U: on /cygdrive/u type prlsf (binary,posix=3D0,user,noumount,auto) > V: on /cygdrive/v type prlsf (binary,posix=3D0,user,noumount,auto) > W: on /cygdrive/w type prlsf (binary,posix=3D0,user,noumount,auto) > X: on /cygdrive/x type prlsf (binary,posix=3D0,user,noumount,auto) > Y: on /cygdrive/y type prlsf (binary,posix=3D0,user,noumount,auto) > Z: on /cygdrive/z type prlsf (binary,posix=3D0,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". > >=20 >=20 > $ /usr/lib/csih/getVolInfo.exe /cygdrive/z > Device Type : 7 > Characteristics : 10 > Volume Name : > Serial Number : 0 > Max Filenamelength : 255 > Filesystemname : > 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 >=20 > (Note that the literal "/usr/lib/csih/getVolInfo.exe Z:" printed > "NtOpenFile(\??\C:\cygwin64\home\jonathan\Z:) failed, c0000033", so I ass= ume > that's not what you want.) Indeed. Sorry, I was thinking of one of my local test hacks using DOS paths. Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --1LKvkjL3sHcu1TtY Content-Type: application/pgp-signature Content-length: 819 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJWOKY+AAoJEPU2Bp2uRE+gPTUP/Arjh9DIbjilS2gZ6EwmNtsf Ul50xpX51BuC6gqJcMORJyswEzRuHNUx/qrSjA0xaduOwXu1FGwpdnuZmsGrMnFr R2rP3nep6obElBk4RxfTM0erRjxGENN6Ttt1g+xXbd69wWomAkrOGfvQfcEBHbvW evyMrj2H6hfpfRwNxvRFxzYzAShqRlhN8TbBd1kFBTEH8XY0ociG5m8haQ2nh5qF MapmCKi2XYGcGmJd35wIxEz7sF3VIra0zoClF4YR/v8f43IgTkLkwQS1nwkOIlv0 u30uvHVtmUOiNeQmYEnm8iUg1e/2JcicWGYcd6k5MrMH1/0TOCh3A6qfJW0LFzig 9sliBemMGb+Rp/RhlbYoRouoD1tQaTxTi6oLcKSmDAuBuLkMJi31zwhzK4hTerUl 7I0ZhJLF21DnOd/kDkIocFP7UqkMG6FJugwVInrQs8bwAGwbugWwJ86g6J32uqZM BxJsVM+C0z1drjrZ/4nWJOBK7k8WqCKX+Zzi8mG5RwiYCcEr9enSj6oH9ipw06YE sc7iBpi/KYZvlIi0xXMM2ev7LnT+dPE8dRenK6AjzXAE/+W36FwBXWXntVXqwaZ6 r5EXQ1tsqhmcct7+Q7qINnDZt/oxHiMsRp0ZcPA87LYlkrRKoTXrRiEtNxXyvoNA 0LOtuL87U073fEnJAyA8 =4+oL -----END PGP SIGNATURE----- --1LKvkjL3sHcu1TtY--