IP Library Granted Patent US 9,087,072
Granted Patent B2
US 9,087,072 · App. 14/252,144 · Granted Jul 21, 2015

File cloning and de-cloning in a data storage system

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 9,087,072
App. No.
14/252,144
Granted
Jul 21, 2015
Kind
B2
Abstract

A file cloning mechanism allows for quickly creating copies (clones) of files within a filesystem, such as when a user makes a copy of a file. In exemplary embodiments, a clone of a source object is at least initially represented by a structure containing references to various elements of the source object (e.g., indirect onodes, direct onodes, and data blocks). Both read-only and mutable clones can be created. The source file and the clone initially share such elements and continue to share unmodified elements as changes are made to the source file or mutable clone. None of the user data blocks or the metadata blocks describing the data stream (i.e., the indirect/direct onodes) associated with the source file need to be copied at the time the clone is created. At appropriate times, cloned files may be “de-cloned.”

Claims (75)

1. A computer program product comprising a tangible, non-transitory computer-readable medium having embodied therein a computer program for cloning a filesystem object in a file storage system, the filesystem object including a root node, an indirect node, at least one data block and a set of pointers being stored in the root node of the filesystem object, wherein the set of pointers of the root node of the filesystem object references the at least one data block via the indirect node referenced to by the set of pointers of the root node of the filesystem object, the computer program including instructions that, when run on a computer processor of the file storage system, causes the computer processor to perform processes comprising:

creating, in the file storage system, a first snapshot object and storing a copy of the set of pointers of the filesystem object in the first snapshot object; and

creating, in the file storage system, a writable clone object and storing a copy of the set of pointers of the filesystem object in the writable clone object;

wherein each of the first snapshot object and the writable clone object includes a respective root node to which the set of pointers of the root node of the filesystem object are copied,

wherein the set of pointers of the root node of the filesystem object, the set of pointers of the root node of the first snapshot object, and the set of pointers of the root node of the writable clone object reference to the same indirect node so that the first snapshot object and the writable clone object share the referenced indirect node and the at least one referenced data block with the filesystem object, and

wherein the filesystem object and the writable clone object become writable versions of the first snapshot object and store changes from a copy of the object represented by the first snapshot object.

2. The computer program product according to claim 1 , wherein

metadata is maintained in the filesystem object and in the writable clone object to link the first snapshot object with the filesystem object and the writable clone object and to link the filesystem object and the writable clone object with the first snapshot object,

wherein the metadata maintained in the filesystem object and the metadata maintained in the writable clone object store a reference to the first snapshot object, and

wherein metadata maintained in the first snapshot object stores a reference count indicating a number of objects referencing the first snapshot object.

3. The computer program product according to claim 1 , wherein

the root node of the filesystem object stores a current checkpoint number (CN), which records a checkpoint of a last modification of the filesystem object, and the current checkpoint number (CN) is stored, upon creation of the first snapshot object and the writable clone object, as a cloned-in-checkpoint number (CCN), which defines the earliest checkpoint in which the filesystem object's data stream can diverge from its associated snapshot object's data stream, in the root node of the filesystem object and in the root node of the writable clone object.

4. The computer program product according to claim 3 , wherein,

if the filesystem object was already a clone, the current checkpoint number (CN) stored in the root node of the filesystem object is further stored, upon creation of the first snapshot object and the writable clone object, as the cloned-in-checkpoint number (CCN) in the root node of the first snapshot object.

5. The computer program product according to claim 1 , further comprising:

the file storage system further includes a live-file object corresponding to the first snapshot object, each object being associated with a number of user data blocks,

wherein the processes further comprise de-cloning of files including:

transferring, for each user data block owned by the first snapshot object and shared with the live-file object, ownership of the user data block to the live-file object; and

removing, subsequent to such transfer, the first snapshot object from the file storage system.

6. The computer program product according to claim 5 , wherein

each object includes a number of block pointers, each pointer associated with a respective checkpoint number, and wherein transferring ownership of the user data block to the live-file object includes:

making the block pointer sparse in the first snapshot object; and

setting the checkpoint number for the corresponding block pointer in the live-file object to the cloned-in-checkpoint number of the live-file object.

7. The computer program product according to claim 1 , wherein the first snapshot object is a hidden filesystem object.

8. The computer program product according to claim 1 , wherein the processes further comprise:

attributing to the writable clone object the size of the filesystem object from which the writable clone object was created.

9. The computer program product according to claim 1 , wherein the processes further comprise:

upon modification of the writable filesystem object or the writable clone object, allocating at least one data block for storage of the modification and associating the at least one allocated data block with the modified object, the modified object including a modified set of pointers.

10. The computer program product according to claim 9 , wherein the processes further comprise:

creating in the file storage system a second snapshot object and storing a copy of the modified set of pointers in the second snapshot object; and

creating in the file storage system a second writable clone object and storing a copy of the modified set of pointers in the second writable clone object.

11. The computer program product according to claim 10 , wherein the processes further comprise:

storing in the second snapshot object a reference to the modified object, a reference to the second writable clone object, and a reference to the first snapshot object;

storing in the modified filesystem object a reference to the second snapshot object; and

storing in the second writable clone object a reference to the second snapshot object.

12. The computer program product according to claim 1 , wherein the processes further comprise:

creating further clones of the filesystem object using the first snapshot object.

13. The computer program product according to claim 1 , wherein each node is an onode.

14. The computer program product according to claim 1 , wherein the first snapshot object is a read-only snapshot object.

15. A file storage system configured for cloning a filesystem object,

the filesystem object including a root node, an indirect node, at least one data block and a set of pointers being stored in the root node of the filesystem object, wherein the set of pointers of the root node of the filesystem object references the at least one data block via the indirect node referenced to by the set of pointers of the root node of the filesystem object,

the file storage system comprising:

at least one storage device; and

a storage processor in communication with the at least one storage device,

the storage processor being configured for:

creating, in the file storage system, a first snapshot object and storing a copy of the set of pointers of the filesystem object in the first snapshot object; and

creating, in the file storage system, a writable clone object and storing a copy of the set of pointers of the filesystem object in the writable clone object;

wherein each of the first snapshot object and the writable clone object includes a respective root node to which the set of pointers of the root node of the filesystem object are copied,

wherein the set of pointers of the root node of the filesystem object, the set of pointers of the root node of the first snapshot object, and the set of pointers of the root node of the writable clone object reference to the same indirect node so that the first snapshot object and the writable clone object share the referenced indirect node and the at least one referenced data block with the filesystem object, and

wherein the filesystem object and the writable clone object become writable versions of the first snapshot object and store changes from a copy of the object represented by the first snapshot object.

16. The file storage system according to claim 15 , wherein

the storage processor is further configured to maintain metadata in the filesystem object and in the writable clone object to link the first snapshot object with the filesystem object and the writable clone object and to link the filesystem object and the writable clone object with the first snapshot object,

wherein the metadata maintained in the filesystem object and the metadata maintained in the writable clone object store a reference to the first snapshot object, and

wherein metadata maintained in the first snapshot object stores a reference count indicating a number of objects referencing the first snapshot object.

17. The file storage system according to claim 15 , wherein

the root node of the filesystem object stores a current checkpoint number (CN), which records a checkpoint of a last modification of the filesystem object, and the current checkpoint number (CN) is stored, upon creation of the first snapshot object and the writable clone object, as a cloned-in-checkpoint number (CCN), which defines the earliest checkpoint in which the filesystem object's data stream can diverge from its associated snapshot object's data stream, in the root node of the filesystem object and in the root node of the writable clone object.

18. The file storage system according to claim 17 , wherein,

if the filesystem object was already a clone, the current checkpoint number (CN) stored in the root node of the filesystem object is further stored, upon creation of the first snapshot object and the writable clone object, as the cloned-in-checkpoint number (CCN) in the root node of the first snapshot object.

19. The file storage system according to claim 15 , wherein

the file storage system further includes a live-file object corresponding to the first snapshot object, each object being associated with a number of user data blocks, and

the storage processor is further configured for de-cloning files in the file storage system to:

transfer, for each user data block owned by the first snapshot object and shared with the live-file object, ownership of the user data block to the live-file object; and

remove, subsequent to such transfer, the first snapshot object from the file storage system.

20. The file storage system according to claim 19 , wherein

each object includes a number of block pointers, each pointer associated with a respective checkpoint number, and for transferring ownership of the user data block to the live-file object, the storage processor is configured to:

make the block pointer sparse in the first snapshot object; and

set the checkpoint number for the corresponding block pointer in the live-file object to the cloned-in-checkpoint number of the live-file object.

21. The file storage system according to claim 15 , wherein the first snapshot object is a hidden filesystem object.

22. The file storage system according to claim 15 , wherein the storage processor is further configured for attributing to the writable clone object the size of the filesystem object from which the writable clone object was created.

23. The file storage system according to claim 15 , wherein the storage processor is further configured for, upon modification of the writable filesystem object or the writable clone object, allocating at least one data block for storage of the modification and associating the at least one allocated data block with the modified object, the modified object including a modified set of pointers.

24. The file storage system according to claim 23 , wherein the storage processor is further configured for creating in the file storage system a second snapshot object and storing a copy of the modified set of pointers in the second snapshot object; and creating in the file storage system a second writable clone object and storing a copy of the modified set of pointers in the second writable clone object.

25. The file storage system according to claim 24 , wherein the storage processor is further configured for storing in the second snapshot object a reference to the modified object, a reference to the second writable clone object, and a reference to the first snapshot object; storing in the modified filesystem object a reference to the second snapshot object; and storing in the second writable clone object a reference to the second snapshot object.

26. The file storage system according to claim 15 , wherein the storage processor is further configured for creating further clones of the filesystem object using the first snapshot object.

27. The file storage system according to claim 15 , wherein each node is an onode.

28. The file storage system according to claim 15 , wherein the first snapshot object is a read-only snapshot object.

Assignments (4)
MERGER Recorded Jan 28, 2020
From: HITACHI VANTARA CORPORATION
To: HITACHI VANTARA LLC
Reel/Frame 051719/0202 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 9, 2019
From: HITACHI DATA SYSTEMS ENGINEERING UK LIMITED
To: HITACHI VANTARA CORPORATION
Reel/Frame 048825/0506 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 19, 2014
From: PICKEN, DANIEL J.N.; BERRINGTON, NEIL
To: BLUEARC UK LIMITED
Reel/Frame 034554/0288 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 16, 2014
From: BLUEARC UK LIMITED
To: HITACHI DATA SYSTEMS ENGINEERING UK LIMITED
Reel/Frame 034512/0357 →