NAND flash memory, as well as other types of non-volatile memories (“NVMs”), are commonly used for mass storage. For example, consumer electronics such as portable media players often include flash memory to store music, videos, and other media.
A system can store different types of files in an NVM. When the system experiences an error, discrepancies can occur between a file system's view of the files stored in the NVM and the actual files that are stored in the NVM. Eventually, when the file system needs to access a particular file, the system may discover that the file is either corrupt or does not exist in the NVM. This then triggers the file system to attempt to recover the file from an external source. The discovery of discrepancies and subsequent recovery during system operation can be disruptive to the user experience.