Fat32 FS Information Sector

DG 1 Reputation point
2021-10-27T14:51:00.943+00:00

Hi,

I have been working on an embedded software application which uses an sd card , and reads the FS Information Sector to identify how much free space is left on the card.

https://en.wikipedia.org/wiki/Design_of_the_FAT_file_system#FS_Information_Sector

Very occasionally , i have found the Free Clusters Value in the FS info sector to be incorrect , after modification with a windows machine.

As i understand it , there are 2 ways for a device to identify how many clusters are free on a fat32 volume , by looking up this sector , or by manually counting every cluster.

It appears as though windows uses both.

Once the fs_info is out of sync , sometimes when deleting a file from the card , it will simply decrement the fs_info by the number of clusters that have been removed by the operation , as if windows is only looking at the fs info.

Other times it will update the fs info to the correct value ,as if it had actually counted the clusters.

Some information as to when the PC trusts the fsinfo file , and when it will re-scan the drive would be appreciated.

It should be noted that the connection between the PC and the SD card is very slow (200-400kbps) , if that changes anything.

Windows Hardware Performance
Windows Hardware Performance
Windows: A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.Hardware Performance: Delivering / providing hardware or hardware systems or adjusting / adapting hardware or hardware systems.
1,541 questions
0 comments No comments
{count} votes