Concurrent access and transactions in a distributed file system
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.
Claims
exact text as granted — not AI-modifiedWhat is claimed is:
1. A method, comprising:
in response to a request to perform a new file system operation, identifying a first set of file system objects to be accessed in performing the requested new file system operation, wherein each file system object of the first set of file system objects is associated with a corresponding file system data structure and the corresponding file system data structures of the first set of file system objects are included in a first set of file system data structures;
determining whether a first file system data structure in the first set of file system data structures identifies an update intent for a previous incomplete file system operation, wherein the update intent for the previous incomplete file system operation specifies an ordered sequence of a second set of file system data structures associated with the previous incomplete file system operation;
in response to a determination that the first file system data structure included in the first set of file system data structures identifies the update intent for the previous incomplete file system operation:
obtaining a second file system data structure included in the second set of file system data structures in a position of the ordered sequence before the first file system data structure that is also included in the second set of file system data structures,
determining whether the second file system data structure identifies the update intent for the previous incomplete file system operation, and
based on at least whether the second file system data structure in the position of the ordered sequence before the first file system data structure identifies the update intent for the previous incomplete file system operation, determining whether to complete a not completed operation of the incomplete file system operation;
wherein the first set of file system objects are to be modified in performing the requested new file system operation and a new update intent associated with the requested new file system operation is stored in each file system data structure of the first set of file system data structures.
2. The method of claim 1 , wherein the first set of file system data structures includes inodes.
3. The method of claim 1 , wherein the second file system data structure stores a version of the update intent for the previous incomplete file system operation that identifies the not completed operation.
4. The method of claim 1 , wherein in response to a determination that the not completed operation of the incomplete file system operation is completed, the update intent is removed from the second file system data structure.
5. The method of claim 1 , wherein the new update intent identifies an ordered sequence of file system data structures in the first set of file system data structures.
6. The method of claim 1 , wherein the new update intent is removed from the file system data structures in the first set of file system data structures in completing the requested new file system operation.
7. The method of claim 1 , further comprising:
obtaining a third file system data structure included in the second set of file system data structures in a position of the ordered sequence after the first file system data structure that is also included in the second set of file system data structures,
determining whether the third file system data structure identifies the update intent for the previous incomplete file system operation, and
based on at least whether the third file system data structure in the position of the ordered sequence after the first file system data structure identifies the update intent for the previous incomplete file system operation, determining whether to abort a not completed operation of the incomplete file system operation.
8. The method of claim 7 , wherein it is determined to complete the not completed operation of the incomplete file system operation in response to determining that the second file system data structure does not identify the update intent for the previous incomplete file system operation and the third file system data structure does identify the update intent for the previous incomplete file system operation.
9. The method of claim 7 , wherein it is determined to abort the not completed operation of the incomplete file system operation in response to determining that the second file system data structure does identify the update intent for the previous incomplete file system operation and the third file system data structure does not identify the update intent for the previous incomplete file system operation.
10. The method of claim 1 , wherein the ordered sequence of the second set of file system data structures associated with the previous incomplete file system operation is an ordered sequence of inodes to be modified in performing the previous incomplete file system operation.
11. The method of claim 1 , further comprising obtaining a node-specific lock and process-specific lock on each data structure included in the first set of file system data structures.
12. The method of claim 1 , wherein request for the new file system operation is received at a node of a distributed file system.
13. The method of claim 1 , wherein new file system operation is an NFS, SMB, or CIFS operation.
14. A system, comprising:
a processor; and
a memory coupled with the processor, wherein the memory is configured to provide the processor with instructions which when executed cause the processor to:
in response to a request to perform a new file system operation, identify a first set of file system objects to be accessed in performing the requested new file system operation, wherein each file system object of the first set of file system objects is associated with a corresponding file system data structure and the corresponding file system data structures of the first set of file system objects are included in a first set of file system data structures;
determine whether a first file system data structure in the first set of file system data structures identifies an update intent for a previous incomplete file system operation, wherein the update intent for the previous incomplete file system operation specifies an ordered sequence of a second set of file system data structures associated with the previous incomplete file system operation;
in response to a determination that the first file system data structure included in the first set of file system data structures identifies the update intent for the previous incomplete file system operation:
obtain a second file system data structure included in the second set of file system data structures in a position of the ordered sequence before the first file system data structure that is also included in the second set of file system data structures,
determine whether the second file system data structure identifies the update intent for the previous incomplete file system operation, and
based on at least whether the second file system data structure in the position of the ordered sequence before the first file system data structure identifies the update intent for the previous incomplete file system operation, determine whether to complete a not completed operation of the incomplete file system operation;
wherein the first set of file system objects are to be modified in performing the requested new file system operation and a new update intent associated with the requested new file system operation is stored in each file system data structure of the first set of file system data structures.
15. The system of claim 14 , wherein the first set of file system data structures includes inodes.
16. The system of claim 14 , wherein the instructions which when executed further cause the processor to:
obtain a third file system data structure included in the second set of file system data structures in a position of the ordered sequence after the first file system data structure that is also included in the second set of file system data structures,
determine whether the third file system data structure identifies the update intent for the previous incomplete file system operation, and
based on at least whether the third file system data structure in the position of the ordered sequence after the first file system data structure identifies the update intent for the previous incomplete file system operation, determine whether to abort a not completed operation of the incomplete file system operation.
17. The system of claim 16 , wherein it is determined to complete the not completed operation of the incomplete file system operation in response to determining that the second file system data structure does not identify the update intent for the previous incomplete file system operation and the third file system data structure does identify the update intent for the previous incomplete file system operation.
18. The system of claim 14 , wherein the new update intent identifies an ordered sequence of file system data structures in the first set of file system data structures.
19. The system of claim 14 , wherein the new update intent is removed from the file system data structures in the first set of file system data structures in completing the requested new file system operation.
20. A computer program product, the computer program product being embodied in a non-transitory computer readable storage medium and comprising computer instructions for:
in response to a request to perform a new file system operation, identifying a first set of file system objects to be accessed in performing the requested new file system operation, wherein each file system object of the first set of file system objects is associated with a corresponding file system data structure and the corresponding file system data structures of the first set of file system objects are included in a first set of file system data structures;
determining whether a first file system data structure in the first set of file system data structures identifies an update intent for a previous incomplete file system operation, wherein the update intent for the previous incomplete file system operation specifies an ordered sequence of a second set of file system data structures associated with the previous incomplete file system operation;
in response to a determination that the first file system data structure included in the first set of file system data structures identifies the update intent for the previous incomplete file system operation:
obtaining a second file system data structure included in the second set of file system data structures in a position of the ordered sequence before the first file system data structure that is also included in the second set of file system data structures,
determining whether the second file system data structure identifies the update intent for the previous incomplete file system operation, and
based on at least whether the second file system data structure in the position of the ordered sequence before the first file system data structure identifies the update intent for the previous incomplete file system operation, determining whether to complete a not completed operation of the incomplete file system operation;
wherein the first set of file system objects are to be modified in performing the requested new file system operation and a new update intent associated with the requested new file system operation is stored in each file system data structure of the first set of file system data structures.Join the waitlist — get patent alerts
Track US10275469B2 — get alerts on status changes and closely related new filings.
We store only your email — no account needed. See our privacy policy.