A method for managing page-based data storage media such as flash media, a system
that uses that method, and a computer-readable storage medium bearing code for
implementing the method. New data are written to the storage medium in a manner
that precludes corruption of old data if the writing of the new data is interrupted.
Specifically, risk zones are defined, by identifying, for each page, the other
pages whose data are put at risk of corruption if writing to the page is interrupted.
A page, that otherwise would be the target of a write operation, is not written
if any of the pages in its risk zone contain data that could be corrupted if the
write operation is interrupted.