IP Library Granted Patent US 10,740,039
Granted Patent B2
US 10,740,039 · App. 15/628,016 · Granted Aug 11, 2020

Supporting file system clones in any ordered key-value store

Inventors: Richard P. Spillane (Palo Alto, CA); Wenguang Wang (Santa Clara, CA)
Assignee: VMWARE, INC.
G06F3/0665G06F3/065G06F3/0659G06F3/0683G06F9/45558G06F11/0718G06F11/1446G06F11/1469G06F16/188G06F16/41G06F2009/45562G06F2009/45579
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,740,039
App. No.
15/628,016
Granted
Aug 11, 2020
Kind
B2
Abstract

Embodiments described herein are related to cloning a volume in a file system. In some embodiments, a directory hard link is used to generate a clone of the root node of the volume. In certain embodiments, upon determining that a file or directory of the clone which comprises a hard link to an index node has been modified, a new object directory is generated beneath a root node of the volume. The index node may be added to the new object directory and one or more files and directories in the volume which link to the index node may be updated to contain symbolic links to the index node in the new object directory. In certain embodiments, a copy-on-write operation is performed in order to copy the file or directory and the new object directory to the clone.

Claims (49)

1. A method for cloning an initial volume in a file system, comprising:

using a directory hard link to generate a clone of a root node of the initial volume; by generating a first new index node for the clone of the root node of the initial volume, wherein the clone of the root node of the initial volume contains one or more files or directories which comprise hard links to index nodes of corresponding files or directories of the initial volume; and

upon determining that a given file or directory of the clone which comprises a hard link to a given index node has been modified:

generating a new object directory beneath a root node of the initial volume, wherein the given index node is added to the new object directory;

identifying one or more files and directories in the initial volume comprising one or more hard links to the given index node;

updating each of the one or more files and directories to contain a symbolic link to the given index node in the new object directory;

performing a first copy-on-write operation in order to copy the given file or directory from the initial volume to the clone;

performing a second copy-on-write operation in order to copy the new object directory from the initial volume to the clone; and

performing a third copy-on-write operation in order to generate a second new index node in the new object directory of the clone which is a copy of the given index node.

2. The method of claim 1 , further comprising:

prior to generating the clone of the root node of the initial volume, adding a super root node above the root node of the initial volume in a logical schema of the file system if it was not added in a previous volume clone or format operation, wherein the clone of the root node of the initial volume is generated below the super root node.

3. The method of claim 1 , wherein the given index node and the second new index node each comprise a respective index node number, and wherein generating the second new index node further comprises:

generating a new index node number to replace an existing index node number of the second new index node, wherein the existing index node number comprises the respective index node number of the given index node.

4. The method of claim 3 , wherein the existing index node number is stored as an external index node number of the second new index node.

5. The method of claim 4 , wherein the external index node number is provided in response to requests by entities outside of the file system for the respective index node number of the second new index node.

6. The method of claim 1 , wherein the file system comprises a key-value store.

7. The method of claim 1 , wherein the given index node and the second new index node each comprise one or more physical addresses of data blocks for the given file or directory.

8. The method of claim 1 , wherein each file and directory in the file system comprises a name which is mapped to a respective index node.

9. A non-transitory computer-readable storage medium comprising instructions that, when executed in a computing device, perform a method for cloning an initial volume in a file system, the method comprising:

using a directory hard link to generate a clone of a root node of the initial volume; by generating a first new index node for the clone of the root node of the initial volume, wherein the clone of the root node of the initial volume contains one or more files or directories which comprise hard links to index nodes of corresponding files or directories of the initial volume; and

upon determining that a given file or directory of the clone which comprises a hard link to a given index node has been modified:

generating a new object directory beneath a root node of the initial volume, wherein the given index node is added to the new object directory;

identifying one or more files and directories in the initial volume comprising one or more hard links to the given index node;

updating each of the one or more files and directories to contain a symbolic link to the given index node in the new object directory;

performing a first copy-on-write operation in order to copy the given file or directory from the initial volume to the clone;

performing a second copy-on-write operation in order to copy the new object directory from the initial volume to the clone; and

performing a third copy-on-write operation in order to generate a second new index node in the new object directory of the clone which is a copy of the given index node.

10. The non-transitory computer-readable storage medium of claim 9 , wherein the method further comprises:

prior to generating the clone of the root node of the initial volume, adding a super root node above the root node of the initial volume in a logical schema of the file system if it was not added in a previous volume clone or format operation, wherein the clone of the root node of the initial volume is generated below the super root node.

11. The non-transitory computer-readable storage medium of claim 9 , wherein the given index node and the second new index node each comprise a respective index node number, and wherein generating the second new index node further comprises:

generating a new index node number to replace an existing index node number of the second new index node, wherein the existing index node number comprises the respective index node number of the given index node.

12. The non-transitory computer-readable storage medium of claim 11 , wherein the existing index node number is stored as an external index node number of the second new index node.

13. The non-transitory computer-readable storage medium of claim 12 , wherein the external index node number is provided in response to requests by entities outside of the file system for the respective index node number of the second new index node.

14. The non-transitory computer-readable storage medium of claim 9 , wherein the file system comprises a key-value store.

15. The non-transitory computer-readable storage medium of claim 9 , wherein the given index node and the second new index node each comprise one or more physical addresses of data blocks for the given file or directory.

16. The non-transitory computer-readable storage medium of claim 9 , wherein each file and directory in the file system comprises a name which is mapped to a respective index node.

17. A computer system for allocating storage space, the computer system comprising:

a storage device comprising a file system;

a processor (CPU) configured to perform a method for cloning an initial volume in the file system, the method comprising:

using a directory hard link to generate a clone of a root node of the initial volume by generating a first new index node for the clone of the root node of the initial volume, wherein the clone of the root node of the initial volume contains one or more files or directories which comprise hard links to index nodes of corresponding files or directories of the initial volume; and

upon determining that a given file or directory of the clone which comprises a hard link to a given index node has been modified:

generating a new object directory beneath a root node of the initial volume, wherein the given index node is added to the new object directory;

identifying one or more files and directories in the initial volume comprising one or more hard links to the given index node;

updating each of the one or more files and directories to contain a symbolic link to the given index node in the new object directory;

performing a first copy-on-write operation in order to copy the given file or directory from the initial volume to the clone;

performing a second copy-on-write operation in order to copy the new object directory from the initial volume to the clone; and

performing a third copy-on-write operation in order to generate a second new index node in the new object directory of the clone which is a copy of the given index node.

18. The computer system of claim 17 , wherein the method further comprises:

prior to generating the clone of the root node of the initial volume, adding a super root node above the root node of the initial volume in a logical schema of the file system if it was not added in a previous volume clone or format operation, wherein the clone of the root node of the initial volume is generated below the super root node.

Assignments (2)
CHANGE OF NAME Recorded Apr 15, 2024
From: VMWARE, INC.
To: VMWARE LLC
Reel/Frame 067102/0395 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 20, 2017
From: SPILLANE, RICK; WANG, WENGUANG
To: VMWARE, INC.
Reel/Frame 042760/0140 →
Continuity (1)
Related Publication 20180364950A1 · Dec 20, 2018