US2013325830A1PendingUtilityA1
Transactional file system
Est. expiryMar 30, 2020(expired)· nominal 20-yr term from priority
Y10S707/959Y10S707/99944Y10S707/99937Y10S707/99942Y10S707/99932Y10S707/99953Y10S707/99952Y10S707/99938Y10S707/99931G06F 16/1865G06F 17/30227
48
PatentIndex Score
0
Cited by
0
References
0
Claims
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.
Claims
exact text as granted — not AI-modifiedWhat is claimed is:
1 . In a transactional file system, a computer-implemented 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;
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 distinguished from the transactional log, the page including a plurality of sectors;
replacing a portion of one or more of the plurality of sectors within the data stream with the cycle count that is included in the undo record;
writing the replaced portion of the plurality of sectors to the undo record corresponding to that cycle count; and
maintaining the cycle count within the copied page in the data stream and within the undo record in such a way as to enable 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.
3 . The method of claim 1 , wherein the portion comprises the last byte of each sector.
4 . The method of claim 1 , further comprising:
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; whereas
if 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.
5 . The method of claim 1 , further comprising:
creating a verify bitmap to maintain an indication of the state of each page in the data stream; upon the pointer wrapping around, verifying that the current cycle count does not match the cycle count of any page in the data stream; and updating a bit in the verify bitmap for each page for which the current cycle count differs from the cycle count stored with the page.
6 . The method of claim 5 , wherein updating the bit in the verify bitmap for each page comprises:
upon the pointer wrapping around, resetting the bitmap so that the bit for each page is set to a first value; and upon verifying that the current cycle count does not match the cycle count of a page in the data stream, changing the bit corresponding to the page to a second value.
7 . The method of claim 1 , wherein the undo record includes an offset indicating the location of the page in the data stream.
8 . The method of claim 1 , wherein the undo record includes a log sequence number for the update.
9 . The method of claim 1 , wherein the cycle count also represents a count of each time a pointer to the data stream wraps around to the start of the data stream.
10 . One or more hardware 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;
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 distinguished from the transactional log, the page including a plurality of sectors;
replacing a portion of one or more of the plurality of sectors within the data stream with the cycle count that is included in the undo record;
writing the replaced portion of the plurality of sectors to the undo record corresponding to that cycle count; and
maintaining the cycle count within the copied page in the data stream and within the undo record in such a way as to enable 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.
11 . The one or more hardware storage devices of claim 11 , wherein the page comprises a plurality of sectors and wherein including the cycle count with the copied page comprises:
copying a portion of each sector into the undo record; and storing the cycle count in place of the copied portion of each sector.
12 . The one or more hardware storage devices of claim 11 , wherein the portion comprises the last byte of each sector.
13 . The one or more hardware storage devices of claim 11 , further comprising:
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; whereas
if 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.
14 . The one or more hardware storage devices of claim 10 , further comprising:
creating a verify bitmap to maintain an indication of the state of each page in the data stream; upon the pointer wrapping around, verifying that the current cycle count does not match the cycle count of any page in the data stream; and updating a bit in the verify bitmap for each page for which the current cycle count differs from the cycle count stored with the page.
15 . The one or more hardware storage devices of claim 14 , wherein updating the bit in the verify bitmap for each page comprises:
upon the pointer wrapping around, resetting the bitmap so that the bit for each page is set to a first value; and upon verifying that the current cycle count does not match the cycle count of a page in the data stream, changing the bit corresponding to the page to a second value.
16 . The one or more hardware storage devices of claim 10 , wherein the undo record includes an offset indicating the location of the page in the data stream.
17 . The one or more hardware storage devices of claim 10 , wherein the undo record includes a log sequence number for the update.
18 . 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;
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 distinguished from the transactional log, the page including a plurality of sectors;
replacing a portion of one or more of the plurality of sectors within the data stream with the cycle count that is included in the undo record;
writing the replaced portion of the plurality of sectors to the undo record corresponding to that cycle count;
maintaining the cycle count within the copied page in the data stream and within the undo record in such a way as to enable 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.Cited by (0)
No later patents cite this yet.
References (0)
No backward citations on record.