> what is that mount path? Is it the drive letter assignment??
Mounting occurs when somebody calls CreateFile on a disk/cd device.
The mounting process enumerates all existing FSDs, calls the mount path of each of them till any one will succeed, and then attaches the successful FSD’s volume device object to the disk stack device object. This kind of attachment differs a lot from the usual IoAttachDevice one which PnP uses.
After mounting, all next CreateFile requests are routed to the FSD and not to the disk stack.
If the initial CreateFile was asking for no pathname (disk device name, and that’s all - \.\c: from user mode), and DesiredAccess == FILE_READ_ATTRIBUTES - then no mount process is triggered.
RawFS is used only when a) all usual FSDs have failed the mount due to filesystem being not recognized AND b) CreateFile was asking for no pathname.
The only thing which RawFS did in older Windows like w2k and XP (dunno on later ones) was the support of NtQueryVolumeInformationFile aka GetDiskFreeSpace(Ex) to allow the user-mode tools like FORMAT to use the latter API to size the disk before formatting.
FORMAT and CHKDSK /F trigger a remount in the end of their operation. The older FSD’s volume object is destroyed, and the very next CreateFile to the volume will trigger the new mount.
Drive letter assignment have nothing to do with all of this, they are not mandatory to access the files - you can use \Device\HarddiskVolume1\MyPath\MyFile.txt in kernel mode and it will work.
–
Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com