This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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

Attachment: signature.asc
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]