Patent ID: 7587656

Claim:
An apparatus, comprising: a storage portion which a plurality of blocks, each block including a data portion and a residue portion, wherein the residue portion is used to store block-level error correction information corresponding to information stored in the data portion; a circuit portion which includes instructions stored therein to: write information to and read information from said storage portion, and perform a simulated write to said storage portion wherein no information is actually written; said circuit portion including: a block-level error correction generator portion configured to generate block-level error correction information when said circuit portion writes information to said storage portion, and generate block-level error correction information when said circuit portion performs a simulated write to said storage portion; and a sector-level error correction generator portion configured to generate sector-level error correction information when said circuit portion writes information to said storage portion; wherein said circuit portion includes instructions stored therein to: receive user data to be stored in a first part of the data portion of a specified block; read previously-stored user data from a second part of the data portion of the specified block and buffering the user data from the second part of the data portion the specified block, wherein the second part includes all of the data portion of the specified block other than the first part thereof; write the received user data to the first part of the data portion of the specified block, causing said sector-level error correction generator portion to generate sector-level error correction information corresponding to the received user data, and causing said block-level error correction generator portion to generate block-level error correction information corresponding to the received user data; write the sector-level error correction information to the first part of the data portion of the specified block; perform a simulated write of the previously-stored user data to the second part of the data portion of the specified block, causing said block-level error correction generator portion to generate block-level error correction information corresponding to the previously-stored user data; and write the block-level error correction information corresponding to the received user data and the previously-stored user data to the residue portion of the specified block.