X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:reply-to :references:mime-version:content-type:in-reply-to; q=dns; s= default; b=JUQV+IbLhNzRfBgGTfu0kpW+mYsJ0/JmbggPRo2ahnMpeZl34dxbe vSNf8N5sY6s5oIp67gMjkxf1KwVBGZ941oXmOJ9rqr0C+xxBLMIB301AmfNdyzzh HSh9GX5Q9wxe7P73KY4IleZ+H6fBfH5+kPqQ/WI+fi2qBvH4EJETJg= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:reply-to :references:mime-version:content-type:in-reply-to; s=default; bh=jgF463rfZOHp+yoZUWkMEpXZor8=; b=VjgECl9qnsHHQgsQisA9pH6lRZyL +kmvzwduwYcwMMGgoKPCDKhVmThx4KgBZ5Qr49Cm0ecQfw3LbAKYSHiMnQeOO3MD ICXCuiHLNP/7nTmqV+JOa/EjkQYvUiE9/birn5BSx2bwvR0iiToZpkEqUeAUl5pk ovrqLUh4OcxazsQ= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-5.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: calimero.vinschen.de Date: Wed, 23 Apr 2014 19:24:13 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: fstat st_size on open files on Parallels filesystem is wrong Message-ID: <20140423172413.GQ2339@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <21333 DOT 25325 DOT 11106 DOT 958642 AT compute01 DOT cs DOT columbia DOT edu> <227151856 DOT 20140421223417 AT yandex DOT ru> <21333 DOT 26515 DOT 393838 DOT 380071 AT compute01 DOT cs DOT columbia DOT edu> <20140422081628 DOT GC2339 AT calimero DOT vinschen DOT de> <21334 DOT 55207 DOT 784319 DOT 488271 AT compute01 DOT cs DOT columbia DOT edu> <20140423084056 DOT GJ2339 AT calimero DOT vinschen DOT de> <21335 DOT 61113 DOT 963950 DOT 516021 AT compute01 DOT cs DOT columbia DOT edu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="wAI/bQb0EMvlZCHl" Content-Disposition: inline In-Reply-To: <21335.61113.963950.516021@compute01.cs.columbia.edu> User-Agent: Mutt/1.5.21 (2010-09-15) --wAI/bQb0EMvlZCHl Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Apr 23 12:47, lennox AT cs DOT columbia DOT edu wrote: > On Wednesday, April 23 2014, "Corinna Vinschen" wrote to "cygwin at cygwi= n.com" saying: >=20 > > Rather than calling GetFileInformationByHandle, try this > > [...] > Okay, looks like FileNetworkOpenInformation is succeeding, but returning a > bad EndOfFile value. >=20 > $ ./win32-size-test 'z:\foo' > z:\foo: NtQueryInformationFile(FileNetworkOpenInformation): EndOfFile=3D0 > z:\foo: NtQueryInformationFile(FileStandardInformation): EndOfFile=3D12 >=20 > $ gdb --quiet --args ./win32-size-test.exe 'z:\foo' > Reading symbols from /cygdrive/z/Emacs-Modtime/win32-size-test.exe...done. > (gdb) break 82 > Breakpoint 1 at 0x100401400: file win32-size-test.c, line 82. > (gdb) run > Starting program: /cygdrive/z/Emacs-Modtime/win32-size-test.exe z:\\foo > [New Thread 10540.0x48dc] > [New Thread 10540.0x39d4] > z:\\foo: NtQueryInformationFile(FileNetworkOpenInformation): EndOfFile=3D0 > z:\\foo: NtQueryInformationFile(FileStandardInformation): EndOfFile=3D12 Wow, strange. > 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. > > Also, to add handling for the Parallels filesystem to Cygwin, I'd > > need the info printed by the getVolInfo tool from the csih package: > >=20 > > $ /usr/lib/csih/getVolInfo /cygdrive/z >=20 > $ /usr/lib/csih/getVolInfo.exe /cygdrive/z/ > Device Type : 7 > Characteristics : 10 > Volume Name : > Serial Number : 0 > Max Filenamelength : 255 > Filesystemname : > Flags : 3 > FILE_CASE_SENSITIVE_SEARCH : TRUE > FILE_CASE_PRESERVED_NAMES : TRUE > FILE_UNICODE_ON_DISK : FALSE > FILE_PERSISTENT_ACLS : FALSE > FILE_FILE_COMPRESSION : FALSE > FILE_VOLUME_QUOTAS : FALSE > FILE_SUPPORTS_SPARSE_FILES : FALSE > FILE_SUPPORTS_REPARSE_POINTS: FALSE > FILE_SUPPORTS_REMOTE_STORAGE: FALSE > FILE_VOLUME_IS_COMPRESSED : FALSE > FILE_SUPPORTS_OBJECT_IDS : FALSE > FILE_SUPPORTS_ENCRYPTION : FALSE > FILE_NAMED_STREAMS : FALSE > FILE_READ_ONLY_VOLUME : FALSE > FILE_SEQUENTIAL_WRITE_ONCE : FALSE > FILE_SUPPORTS_TRANSACTIONS : FALSE 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=3D=3DFALSE so, never mind. OTOH, does it support hardlinks? If so, two hardlinks to the same file would have different inode numbers on Cygwin. Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --wAI/bQb0EMvlZCHl Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJTV/c9AAoJEPU2Bp2uRE+gP9cP/AkkthuH4x71OHtCpa97WLs4 TTNFnPOpSxBRnwwqkd/nJKDkRyV+HIMxAL9fCu4QwEl7nNXuSX1WHJlnNqBcOr/h RFsLdTtDBxzgECcZ2T4FtGoyfxqO5dbKIBzt+QFMLoy8A2twClCvcpaHpxt9JUzs D2t3MZcS7KhActXf7uhSPzKbLYPI6C8z8KN36pOn+tTBwO3fhTDc2C3c/dExf+N6 EriNtc8Jb3hOCRYKoWnGTSpEzdN+KGOw9gFlFoMOplip6ZnwwLCO4C77D1nl9B6T y+Xilw4VjbSIoIKEeUTmrVskmsjSsz1qjLk9Wd1PoAakLUkixVR9fXlBRWRyx/it x2F6J2XEIgzhQjWhTKk6feujiisyafoXbNXkU34llvQKJR7ISLbG3Erqjs359/jp xOo8BAR9pwfjbdsR0SluQ7coiCXfC3JmiXeHC+Vhgd2ycnicmW06Mowkk7Nma0SH U13VzcmmknhzMrwbCfCfz12vIdX0l17GRZMvAqA5T5NMyzT/iuuH1XY9RhAQagPT DRqW1RW6C4gFRIZtkkpVfroz71Xg/AVY13CV0OwieN6J+GOHVAJ/SZusNwIBKNgE 688EJJn3HOfK4UG0vwrVbOtG8rZgrv7hPX4v8qQkw2n07xx5RVjn/hlXvNvA6Egp oRXMO48BXohKODChEF7L =dJkS -----END PGP SIGNATURE----- --wAI/bQb0EMvlZCHl--