Scott108
lvl.4
Flight distance : 314419 ft
United States
Offline
|
MisterFrag Posted at 9-3 15:44
Regarding the “damaged SD card” issue, the problem isn’t that the file system isn’t being marked as “clean”, there is no such flag for FAT/FAT32/exFAT.
The problem is that the two file allocation tables (hence the name FAT in the names of the file systems) that are present on the media are not identical. When space is allocated on the card as files are written to and grow, clusters of disk sectors are marked as “in use”. Two FATs are kept for redundancy and to detect improper closing of the file system — if the disk/card is ejected cleanly the two FATs are identical, if the disk/card was ejected in the middle of a write or some other update the two FATs won’t match, and this produces the warning about damage the next time the disk is mounted.
No, the ExFat format most definitely DOES have a dirty indicator. Bit 1 of the VolumeFlags.
https://docs.microsoft.com/en-us ... exfat-specification
The chkdsk utility also includes a specific parameter (/markclean) to reset the bit as "clean" on FAT/FAT32/exFAT file systems.
Your example of the two allocation tables being inconsistent can also cause Windows to propose a scan. However, in that case, the scan will find and fix that inconsistency. That is NOT the situation being discussed here, as the scans find NO errors and simply mark the file system as "clean" since the MA2 failed to do so.
This can be easily verified by hex editing only the dirty bit (setting bit to 0), or using "chkdsk /markclean", on a card removed from the MA2 and exhibiting the warning when mounted on Windows. Resetting the bit eliminates the error message when the card is subsequently mounted. |
|