Patent ID: 8756361

Claim:
A disk drive, comprising: a disk; a head actuated over the disk; and a controller configured to: process a write operation to write data on the disk using the head; prior to writing the data on the disk, store logical-to-physical mapping information in a circular buffer for the data to be written, wherein the logical-to-physical mapping information identifies locations on the disk to write the data; write a plurality of metadata files on the disk using the head, wherein the plurality of metadata files are interspersed with the data on the disk and each of the metadata files includes contents of the circular buffer at a time the metadata file is written on the disk; maintain a newest entry pointer identifying a head of the circular buffer; and when the write operation is aborted, modify the logical-to-physical mapping information in the circular buffer by adjusting the newest entry pointer to correspond to the data last written to the disk.