Hi,
I have written a SCSI class driver for a removable media that links under
the FastFat FSD.
If the hard disk in the system is NTFS then the FastFat driver does not get
loaded. The system dynamically loads FastFat when it first has to access a
FAT media.
The problem is that Fs_Rec (the file system recognizer driver) does not
appear to handle a media changed condition. If I first boot the system,
start explorer, insert my media and then select my drive the error ‘The
Volume does not contain a recognized file system’ is returned. On retry the
media is accessed correctly.
From debugging I find that Fs_Rec first sends an IOCTL GetGeometry. My
driver detects a media changed condition and returns STATUS_VERIFY_REQUIRED.
The volume is not mounted and so DO_VERIFY_VOLUME is not set. Fs_Rec then
gives up and passes the request on to the NTFS driver which does a few
IOCTL’s, reads a few sectors, decides the media is not NTFS and the above
error is returned. On retry the media changed condition is cleared and the
geometry is returned.
If I force the Get Geometry IOCTL to return the appropriate geometry
information and STATUS_SUCCESS then Fs_Rec requests the boot sector and
FastFat gets loaded. The volume is now recognized and everything proceeds
correctly.
The problem with this is that Get Geometry is being forced to lose the media
changed condition! I am concerned that this will cause problems in other
configurations.
Should I try to detect when I am being called from Fs_Rec? I could then
ignore the media changed condition. How would I do this? (could I look up
the irp stack?)
I am wondering if other removable media people have seen this problem?
Anyone from Iomega out there?
Thanks for any help.
Hayden.