Patent ID: 8341371

Claim:
A method of managing a memory device, comprising: (a) including a flash memory in the memory device; (b) sending to the memory device, by a host of the memory device, a first data chunk, said first data chunk being one version of data among one or more versions of data sharing a common logical address; (c) providing a signature to identify the version of said first data chunk, wherein the signature is generated by cyclically incrementing a signature of a prior version of said first data chunk; (d) storing said first data chunk in a first erase block in said flash memory; (e) copying said first data chunk to a second erase block in said flash memory, thereby producing a copy of said first data chunk with the common logical address, said copy of said first data chunk being the same version as the first data chunk; (f) assigning to said copy a signature that matches said signature of said first data chunk; wherein a plurality of said first data chunks are sent to the memory device, assigned respective signatures, stored in respective first erase blocks and copied to respective second erase blocks, and wherein each said copy is assigned a respective said signature wherein each said first data chunk has a respective logical address, the method further comprising the step of: (g) in seeking to erase an erase block of said flash memory that includes at least two of said first data chunks: (i) for each said first data chunk that is included in said erase block of said flash memory: seeking all said copies that have said logical address of said each first data chunk; and (ii) erasing said erase block of said flash memory only if, for each said first data chunk that is included in said erase block of said flash memory, said signature of one of said copies that has said logical address of said each data chunk matches said signature of said each data chunk.