df and ls for root directories on Win9X

Pierre A. Humblet Pierre.Humblet@ieee.org
Mon May 26 12:29:00 GMT 2003


At 10:11 AM 5/26/2003 +0200, Corinna Vinschen wrote:
>On Sun, May 25, 2003 at 05:54:32PM -0400, Pierre A. Humblet wrote:
>> Meanwhile I found out that my statfs change fixing the MS GetFreeDiskSpace
>> bug exposes (on WinME only) a MS GetFreeDiskSpaceEx bug.
>> <http://support.microsoft.com/default.aspx?scid=kb%3ben-us%3b314417>  
>> 
>> Experimentally, that can be fixed by calling GetFreeDiskSpaceEx before
>> GetFreeDiskSpace, but not more than once per 3 sec... BTW, looking
>> up the disk properties in Windows has the same feature.
>
>Did you actually test that?  The KB article doesn't tell anything about
>calling GetFreeDiskSpace after GetFreeDiskSpaceEx fixing the problem.
>It just says calling GetFreeDiskSpace instead ofGetFreeDiskSpaceEx is
>a possible workaround (very funny).
>
Yes, I did test it. The bug above is due to a caching problem. 
Calling GetFreeDiskSpace fills the cache and the subsequent 
GetFreeDiskSpaceEx gets the wrong value. In fact that was frustrating 
to debug because it doesn't happen when you step through gdb 
(more than 3 sec before the calls ).
In all of MS examples either GetFreeDiskSpaceEx or GetFreeDiskSpace 
gets called, never both. That's probably why they don't mention this
specific combination. We need both because the Ex call doesn't report
cluster size.

>OTOH, there's a fix for ME available at Micosoft.

Yep, but apparently involves calling MS. It's not part of the regular
Windows update.

Pierre 



More information about the Cygwin-patches mailing list