| delorie.com/archives/browse.cgi | search |
| 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=a0dYDSdzdiyJ5J31AdqM8LeTJvUP9XTe5ebod26vJY8qqqbUKjakl | |
| YMKHmU6yaO2pVOM60Wbb/nOGydn4x2vqHjFbejVLJvdqsdwlMi7kYMQ6oNZ+Ep6n | |
| 2QSaVGsUxVthnG5vG6hzfp4C1I01x2FN1P/48GBKF0k9PpOJccZsPM= | |
| 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=DV+30VIK124Km/TN7UfeboJ0ZmM=; b=ciD89WOjvbrS1OgLZa7WCoJXm43e | |
| jbWVBO1z6iFQ4b71/KOvlhQ+kjXa9SK8Xm5buqymnVNp6zjLhdm+4CdXOjjDdltu | |
| A4ZPbBAYn7TC3DmvWGQTbunzVUTatwZ4o74ECjyh4X2VEpyzsCJ2/AOXmE9/jp6S | |
| YGgcOvr9gfhvmbM= | |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Id: | <cygwin.cygwin.com> |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| 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, 27 Aug 2014 17:37:00 +0200 |
| From: | Corinna Vinschen <corinna-cygwin AT cygwin DOT com> |
| To: | cygwin AT cygwin DOT com |
| Subject: | Re: Why does df fail to stat CIFS shares? |
| Message-ID: | <20140827153700.GL20700@calimero.vinschen.de> |
| Reply-To: | cygwin AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| References: | <20140627143626 DOT GA9220 AT F1S712WWS> <20140703094152 DOT GB1803 AT calimero DOT vinschen DOT de> <loom DOT 20140826T110928-929 AT post DOT gmane DOT org> <20140826124557 DOT GB5740 AT calimero DOT vinschen DOT de> <loom DOT 20140827T165747-369 AT post DOT gmane DOT org> <20140827151536 DOT GK20700 AT calimero DOT vinschen DOT de> |
| MIME-Version: | 1.0 |
| In-Reply-To: | <20140827151536.GK20700@calimero.vinschen.de> |
| User-Agent: | Mutt/1.5.23 (2014-03-12) |
--x+WOirvrtTKur1pg
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Aug 27 17:15, Corinna Vinschen wrote:
> On Aug 27 15:06, Achim Gratz wrote:
> > Corinna Vinschen <corinna-cygwin <at> cygwin.com> writes:
> > > The call to NtQueryVolumeInformationFile() in
> > > fhandler_disk_file::fstatvfs() in fhandler_disk_file.cc (line 737ff),
> > > fails with STATUS_INVALID_PARAMETER. This is a NetApp bug, but we may
> > > be able to workaround it.
> >=20
> > The bug (if there is one) is that the driver should return
> > STATUS_INVALID_INFO_CLASS since it quite obviously doesn't support that=
info
> > class request. Falling back to FileFsSizeINformation does and returns
> > sensible values for all NetApp volumes. Since at least all NetApp volu=
mes
> > here run without quotas anyway, no information loss occurs IIUC.
>=20
> -v, please. What means "obviously" here? Did you ask Netapp?
>=20
> The FileFsFullSizeInformation class is *old*, it has been introduced
> with Windows 2000. Did you test all combinations I asked you for? Can
> you provide detailed results? It might help to find a working combinatio=
n.
Btw., one other hare-brained idea would be if the Netapp FS has a
somewhat different idea of the size of FILE_FS_FULL_SIZE_INFORMATION,
maybe due to a misunderstanding in alignment. What you could try is
to make full_fsi a pointer:
PFILE_FS_FULL_SIZE_INFORMATION full_fsi =3D
(PFILE_FS_FULL_SIZE_INFORMATION)
alloca (2 * sizeof (FILE_FS_FULL_SIZE_INFORMATION));
and then change all "full_fsi." to "full_fsi->"
If nothing else works, try this workaround for size:
Index: fhandler_disk_file.cc
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvs/src/src/winsup/cygwin/fhandler_disk_file.cc,v
retrieving revision 1.401
diff -u -p -r1.401 fhandler_disk_file.cc
--- fhandler_disk_file.cc 27 Aug 2014 11:42:17 -0000 1.401
+++ fhandler_disk_file.cc 27 Aug 2014 15:36:44 -0000
@@ -800,6 +800,26 @@ fhandler_disk_file::fstatvfs (struct sta
}
ret =3D 0;
}
+ else if (status =3D=3D STATUS_INVALID_PARAMETER /* Netapp */
+ || status =3D=3D STATUS_INVALID_INFO_CLASS)
+ {
+ FILE_FS_SIZE_INFORMATION fsi;
+ status =3D NtQueryVolumeInformationFile (fh, &io, &fsi, sizeof fsi,
+ FileFsSizeInformation);
+ if (NT_SUCCESS (status))
+ {
+ sfs->f_bsize =3D fsi.BytesPerSector * fsi.SectorsPerAllocationUnit;
+ sfs->f_frsize =3D sfs->f_bsize;
+ sfs->f_blocks =3D (fsblkcnt_t) fsi.TotalAllocationUnits.QuadPart;
+ sfs->f_bfree =3D sfs->f_bavail =3D
+ (fsblkcnt_t) fsi.AvailableAllocationUnits.QuadPart;
+ ret =3D 0;
+ }
+ else
+ debug_printf ("%y =3D NtQueryVolumeInformationFile"
+ "(%S, FileFsSizeInformation)",=20
+ status, pc.get_nt_native_path ());
+ }
else
debug_printf ("%y =3D NtQueryVolumeInformationFile"
"(%S, FileFsFullSizeInformation)",=20
Corinna
--=20
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
--x+WOirvrtTKur1pg
Content-Type: application/pgp-signature
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAEBAgAGBQJT/fscAAoJEPU2Bp2uRE+guEAQAIaf4P2XmTrPrkw4W1pjY8FV
yQbYZVpzSm7go3PeIJy3xUPqPU/z3wrjyqCM9MBgoP3ACR0VpKw1D+FgXc9hAQI+
+zLa+VPVJ0u7V8byhQMR31tWgAgkigTBdTXxQsiEb1hqq0IdnEZIBIN7xZslavfH
OuPGv71yAoRhJo7tQ2FFZpzIfi9iAkX8oO/YEtl/BJtzXujPAVx0TwbjVM6GMOhz
tFk2TrhZX70IBloZ8LFojlbwoq4k9/4ANV0dYhuyF4MnmbB9RSRnkVbOF7egbAs/
9Tp/dBl6BzQ/vtIkoFgjtLkwf5UlFE9br1H2pHGVEx2dHlpyOVmdVttoQ8VmXEos
E6E6+OZzBkJycMqa69cjplLHwo5+BDOV+XdrOFrMfXL/oY1T/qfL0MBzpE0kzZi1
dp57+6xGa83vnNONL+xPE2G77W6W+Nkgh1ql5RMasi6LO3TRYGcGIAagBTHkNgkF
nOHtgYFYK8KhzSAlBZDFIzBpuWVu+E7SmZI9mesG3hY58RsjXuVb6nI8sj8FY5lr
b1rR8kKsZPj1u7midEvweqEIZGFzLs+phAttgBlHoLcpof6GRAZRgEMaOZ4wQB1H
FVa8WNXs+cVq9/OCm5BEmgGuvCFYO/YuVN2oZHBV963aO6YMe87FVo+GRyWjSYrV
y+ocxzsLFvK6dUm7ZsNG
=bNHC
-----END PGP SIGNATURE-----
--x+WOirvrtTKur1pg--
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |