3.0.7(0.338/5/3): Possible reference to Developer's instances of dev files in deployed build

Corinna Vinschen corinna-cygwin@cygwin.com
Fri Dec 6 14:35:00 GMT 2019


On Dec  6 12:07, Corinna Vinschen wrote:
> Right.  Cygwin uses a simple mechanism to check the drives to show
> under /cygdrive.  Basically it just calls the Win32 function
> GetLogicalDriveStrings(), then, for each drive, it checks the
> QueryDosDevice mapping.  Right now it only accepts cdrom, floppy,
> harddrive, LanmanRedirector (SMB) and MRxNfs (NFS).  All other
> drive types are treated as "no disk".  This is fixable with probably not
> too much effort.

Ah, yes, there's a problem.  When listing /cygdrive, we're trying to do
this as quick as possible.  For network drives, we check if they are
available using a function NetUseGetInfo, which only takes a few ms,
even if the drive is unavailable.

As soon as this function returns the state "disconnected", Cygwin
skips the drive in /cygdrive.

However, this function does not know anything about client side caching
(CSC).  To find out if the drive is available via CSC, the drive
has to be opened and checked for filesystem information, which reflects
the state that the filesystem is still available offline.

The problem with this approach is, it would have to be called for
each unavailable drive in /cygdrive.  This takes multiple secs per
drive.  That's exacly what we tried to avoid when calling the
aforementioned NetUseGetInfo function in the first place.

Checking for a CSC-ed drive when disconnected would make /cygdrive
listing very slow, just as in the old days...


Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20191206/376f821a/attachment.sig>


More information about the Cygwin mailing list