I am working on a legacy formatter application that writes FAT and UDF
formats to a removable drive (MO, etc.). We are encountering some
difficulty with the FAT filesystem driver recognizing the format once the
process is complete. The application uses the following basic chain of
events to write the format:
- Open handle to volume.
- Issue IOCTL_LOCK_VOLUME.
- Write format.
- Issue IOCTL_DISMOUNT_VOLUME.
- Issue IOCTL_UNLOCK_VOLUME.
- Broadcast volume change message to system.
- Close handle.
This all seems to work as expected when writing a UDF format to the disk.
When the volume is unlocked, the UDF file system will recognize and mount
the volume. However, the FAT filesystem is not a cooperative, and will only
mount a disk that orginally had a FAT format. If the disk orginally
contained a UDF or NTFS format, and was formatted to FAT, the FAT filesystem
will not mount it, and so far I can tell, is not even interested in looking
at it. The system will claim the disk is not formatted. However, if the
disk is ejected and re-inserted, the FAT filesystem will mount it. So the
filesystem structures written to the disk are valid. Does anyone have any
idea what else we need to do, or what we need to change, to make the FAT
filesystem mount these disks?
Thanks,
Gary Glenn