Disclosed is a method, system, and data structures for updating data in
a storage device. An update to one or more blocks of customer data at addresses
in the storage device is received. For each block of data to update, metadata is
generated indicating the address of the block in the storage device and an error
checking code that is capable of being used to determine whether the customer data
in the block has changed. For each block of data to update, the block of data to
update and the metadata for the block are written to cache. Further, for each block
of data to update, the block of data and the metadata are transferred for the block
from the cache to the storage device. The metadata may be used during power loss
and recovery.