Patent ID: 7536507

Claim:
A method for preserving an atomic write to a disk array, the method comprising: (a) storing portions of a file in paired locations on a disk array such that a first location of a location pair for a file portion stores scratch data for the file portion and a second portion of the location pair for the file portion stores valid data for the file portion and storing a bitmap on the disk array, the bitmap having bits indicating whether valid data for each file portion resides in the first or the second location for its respective location pair; (b) receiving a write request to write data to a portion of the file being less than the entire file, wherein the bitmap indicates that valid data for the portion of the file to be written to resides in a first memory location of one of the location pairs on the disk array, and, in response: (i) copying the bitmap to memory; (ii) copying data for the portion of the file requested to be modified from the first location of the one location pair to a second location of the one location pair on the disk array without copying the entire file and modifying the data in the second location based on the data to be written; (iii) modifying the bitmap stored in memory to indicate that valid data for the portion of the file resides in the second location of the one location pair and that scrach data for the portion of the file resides in the first location on the disk array; and (c) receiving a request to save the modification, and, in response to the request to save the modified data, replacing the bitmap stored on the disk array with the modified bitmap.