Patent attributes
Techniques are provided for block-level fail atomicity on byte-level non-volatile media. In one technique, an offset table and application data that stores content of a file are stored for a file. The offset table includes multiple entries, each entry being associated with a different offset value and storing a logical block address (LBA) that references a location in the application data. In response to receiving a request, that includes an input buffer and an offset value, to update the file: (a) an entry, in the offset table, that corresponds to the offset value and comprises a first LBA is identified; (b) a second LBA that is considered free is identified; (c) the second LBA is replaced with the first LBA; (d) the input buffer is written to a location, in the application data, that the second LBA references; and (e) the second LBA is added in the entry.