Patent ID: 8924832

Claim:
A non-volatile data storage system, comprising: a non-volatile memory array comprising a plurality of physical addresses each configured to store user data and metadata; and a controller configured to: maintain a mapping associating a set of physical addresses of the plurality of physical addresses in the non-volatile memory array with a set of logical addresses, the set of physical addresses including at least a first physical address and a second physical address different from each other, the first physical address storing at least a first user data and a first metadata, the set of logical addresses including at least a first logical address and a second logical address different from each other, the mapping indexed by the set of logical addresses; attempt to move the first user data from the first physical address to the second physical address by associating in the mapping the first logical address with the second physical address; determine whether the first user data is unrecoverable; and in response to determining that the first user data is unrecoverable: determine, in the mapping, based at least in part on the first metadata, whether the first logical address is associated with the first physical address; if the first logical address is associated in the mapping with the first physical address, dissociate in the mapping the first logical address from the first physical address; and if the logical address indicated in the first metadata is not associated with the first physical address, attempt to locate the second logical address corresponding to the first physical address in the mapping based on flipping one or more bits in data read from the first metadata.