Transactional file system
First Claim
1. In a transactional file system, a method of recording page changes in a transactional log, comprising:
- receiving a request, from a transaction, to update a file;
copying a page into memory, the page including the file;
prior to applying the update to the file within the page in memory;
adding an undo record to a transactional log in persistent storage to reflect the update, the undo record including a cycle count that represents a current status of the page;
copying the page to a data stream in persistent storage, the data stream being separate from the transactional log, the page including a plurality of sectors;
replacing a portion of each of the plurality of sectors within the data stream with the cycle count that is included in the undo record;
wherein each portion of the plurality of sectors that is replaced by the cycle count is also written to the undo record corresponding to that cycle count;
wherein maintaining the cycle count within the copied page in the data stream and within the undo record enables the data stream and the transactional log to be written to persistent storage in an arbitrary order while still enabling the data stream and transactional log to be used to recover from a system failure during the transaction.
2 Assignments
0 Petitions
Accused Products
Abstract
A transactional file system wherein multiple file system operations may be performed as a transaction. An application specifies that file system-related operations are to be handled as a transaction, and the application is given a file handle associated with a transaction context. For file system requests associated with a transaction context, a file system component manages operations consistent with transactional behavior. Logging and recovery are also facilitated by logging page data separate from the main log with a unique signature that enables the log to determine whether a page was fully flushed to disk prior to a system crash.
62 Citations
20 Claims
-
1. In a transactional file system, a method of recording page changes in a transactional log, comprising:
-
receiving a request, from a transaction, to update a file; copying a page into memory, the page including the file; prior to applying the update to the file within the page in memory; adding an undo record to a transactional log in persistent storage to reflect the update, the undo record including a cycle count that represents a current status of the page; copying the page to a data stream in persistent storage, the data stream being separate from the transactional log, the page including a plurality of sectors; replacing a portion of each of the plurality of sectors within the data stream with the cycle count that is included in the undo record; wherein each portion of the plurality of sectors that is replaced by the cycle count is also written to the undo record corresponding to that cycle count; wherein maintaining the cycle count within the copied page in the data stream and within the undo record enables the data stream and the transactional log to be written to persistent storage in an arbitrary order while still enabling the data stream and transactional log to be used to recover from a system failure during the transaction. - View Dependent Claims (2, 3, 4, 5, 6, 7, 20)
-
-
8. One or more memory storage devices storing computer executable instructions which when executed perform a method of recording page changes in a transactional log, comprising:
-
receiving a request, from a transaction, to update a file; copying a page into memory, the page including the file; prior to applying the update to the file within the page in memory; adding an undo record to a transactional log in persistent storage to reflect the update, the undo record including a cycle count that represents a current status of the page; copying the page to a data stream in persistent storage, the data stream being separate from the transactional log, the page including a plurality of sectors; replacing a portion of each of the plurality of sectors within the data stream with the cycle count that is included in the undo record; wherein each portion of the plurality of sectors that is replaced by the cycle count is also written to the undo record corresponding to that cycle count; wherein maintaining the cycle count within the copied page in the data stream and within the undo record enables the data stream and the transactional log to be written to persistent storage in an arbitrary order while still enabling the data stream and transactional log to be used to recover from a system failure during the transaction. - View Dependent Claims (9, 10, 11, 12, 13, 14, 15)
-
-
16. A computer system comprising:
-
one or more processors; memory; and persistent storage; wherein the system memory stores computer executable instructions which when executed by the one or more processors perform a method of recording page changes in a transactional log, comprising; receiving a request, from a transaction, to update a file; copying a page into memory, the page including the file; prior to applying the update to the file within the page in memory; adding an undo record to a transactional log in persistent storage to reflect the update, the undo record including a cycle count that represents a current status of the page; copying the page to a data stream in persistent storage, the data stream being separate from the transactional log, the page including a plurality of sectors; replacing a portion of each of the plurality of sectors within the data stream with the cycle count that is included in the undo record; wherein each portion of the plurality of sectors that is replaced by the cycle count is also written to the undo record corresponding to that cycle count; wherein maintaining the cycle count within the copied page in the data stream and within the undo record enables the data stream and the transactional log to be written to persistent storage in an arbitrary order while still enabling the data stream and transactional log to be used to recover from a system failure during the transaction; after a system failure, locating the undo record in the transactional log thus indicating that the transactional log was written to persistent storage prior to the system failure; and determining whether the data stream containing the copied page was written to persistent storage prior to the system failure by comparing the cycle count in the undo record with cycle count stored in the portion of each sector, and; if the cycle count in the undo record matches the cycle count in the portion of each sector, determining that the data stream was written to persistent storage prior to the system failure, and restoring each portion of the plurality of sectors that was overwritten by the cycle count with the corresponding portion of the plurality of sectors that was written to the undo record;
whereasif the cycle count in the undo record does not match the cycle count in the portion of each sector, determining that the data stream was not written to persistent storage prior to the system failure. - View Dependent Claims (17, 18, 19)
-
Specification