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
signature.asc
Description: PGP signature