Concurrent access and transactions in a distributed file system
First Claim
1. A method for performing a transaction in a distributed file system, the method comprising:
- in response to a request to perform a file system operation, identifying a first set of file system objects modified in performing the requested file system operation, wherein each file system object has an associated inode;
upon determining that a first one of the inodes in the first set of file system objects stores an update intent from an incomplete file system operation;
identifying, in the update intent from the incomplete file system operation, a first ordered sequence of inodes, the first ordered sequence associated with the incomplete file system operation,retrieving, as available, the inodes specified by the first ordered sequence, andupon determining (i) that a first set of one or more inodes at the beginning of the first ordered sequence includes the update intent related to the incomplete file system operation and (ii) that a second set of one or more inodes following the first set of indoes does not include the update intent related to the incomplete file system operation, removing the update intent from each inode specified by the first ordered sequence that includes the update intent;
inserting an update intent corresponding to the requested file system operation into the inode associated with each identified file system object, wherein the inserted update intent specifies a second ordered sequence of inodes, the second ordered sequence being associated with the requested file system operation; and
for each inode in the second ordered sequence;
modifying either the inode or the file system object corresponding to the inode as specified by the update intent in that inode, andafter modifying the inode or the file system object corresponding to the inode, removing the update intent from that inode.
2 Assignments
0 Petitions
Accused Products
Abstract
Embodiments described herein provide techniques for maintaining consistency in a distributed system (e.g., a distributed secondary storage system). According to one embodiment of the present disclosure, a first set of file system objects included in performing the requested file system operation is identified in response to a request to perform a file system operation. An update intent corresponding to the requested file system operation is inserted into an inode associated with each identified file system object. Each file system object corresponding to the inode is modified as specified by the update intent in that inode. After modifying the file system object corresponding to the inode, the update intent is removed from that inode.
44 Citations
15 Claims
-
1. A method for performing a transaction in a distributed file system, the method comprising:
-
in response to a request to perform a file system operation, identifying a first set of file system objects modified in performing the requested file system operation, wherein each file system object has an associated inode; upon determining that a first one of the inodes in the first set of file system objects stores an update intent from an incomplete file system operation; identifying, in the update intent from the incomplete file system operation, a first ordered sequence of inodes, the first ordered sequence associated with the incomplete file system operation, retrieving, as available, the inodes specified by the first ordered sequence, and upon determining (i) that a first set of one or more inodes at the beginning of the first ordered sequence includes the update intent related to the incomplete file system operation and (ii) that a second set of one or more inodes following the first set of indoes does not include the update intent related to the incomplete file system operation, removing the update intent from each inode specified by the first ordered sequence that includes the update intent; inserting an update intent corresponding to the requested file system operation into the inode associated with each identified file system object, wherein the inserted update intent specifies a second ordered sequence of inodes, the second ordered sequence being associated with the requested file system operation; and for each inode in the second ordered sequence; modifying either the inode or the file system object corresponding to the inode as specified by the update intent in that inode, and after modifying the inode or the file system object corresponding to the inode, removing the update intent from that inode. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A non-transitory computer-readable medium storing instructions that, when executed by a processor, cause the processor to perform an operation for performing a transaction in a distributed file system, the operation comprising:
-
in response to a request to perform a file system operation, identifying a first set of file system objects modified in performing the requested file system operation, wherein each file system object has an associated inode; upon determining that a first one of the inodes in the first set of file system objects stores an update intent from an incomplete file system operation; identifying, in the update intent from the incomplete file system operation, a first ordered sequence of inodes, the first ordered sequence associated with the incomplete file system operation, retrieving, as available, the inodes specified by the first ordered sequence, and upon determining (i) that a first set of one or more inodes at the beginning of the first ordered sequence includes the update intent related to the incomplete file system operation and (ii) that a second set of one or more inodes following the first set of inodes does not include the update intent related to the incomplete file system operation, removing the update intent from each inode specified by the first ordered sequence that includes the update intent; inserting an update intent corresponding to the requested file system operation into the inode associated with each identified file system object, wherein the inserted update intent specifies a second an ordered sequence of inodes, the second ordered sequence being associated with the requested file system operation; and for each inode in the second ordered sequence; modifying either the inode or the file system object corresponding to the inode as specified by the update intent in that inode, and after modifying the inode or the file system object corresponding to the inode, removing the update intent from that inode. - View Dependent Claims (8, 9, 10)
-
-
11. A system comprising:
-
a processor; and a memory storing program code, which, when executed on the processor performs an operation for performing a transaction in a distributed file system, the operation comprising; in response to a request to perform a file system operation, identifying a first set of file system objects modified in performing the requested file system operation, wherein each file system object has an associated inode; upon determining that a first one of the inodes in the first set of file system objects stores an update intent from an incomplete file system operation; identifying, in the update intent from the incomplete file system operation, a first ordered sequence of inodes, the first ordered sequence associated with the incomplete file system operation; retrieving, as available, the inodes specified by the first ordered sequence; and upon determining (i) that a first set of one or more inodes at the beginning of the first ordered sequence includes the update intent related to the incomplete file system operation and (ii) that a second set of one or more inodes following the first set of inodes does not include the update intent related to the incomplete file system operation, removing the update intent from each inode specified by the first ordered sequence that includes the update intent, inserting an update intent corresponding to the requested file system operation into the inode associated with each identified file system object, wherein the inserted update intent specifies a second ordered sequence of inodes, the second ordered sequence being associated with the requested file system operation, and for each inode; modifying either the inode or the file system object corresponding to the inode as specified by the update intent in that inode, and after modifying the inode or the file system object corresponding to the inode, removing the update intent from that inode. - View Dependent Claims (12, 13, 14, 15)
-
Specification