IP Library Granted Patent US 9,760,579
Granted Patent B2
US 9,760,579 · App. 15/142,174 · Granted Sep 12, 2017

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,760,579
App. No.
15/142,174
Granted
Sep 12, 2017
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 (51)

1. A computer program product comprising a tangible, non-transitory computer-readable medium having embodied therein a computer program adapted to cause a processing unit of a storage apparatus to execute a method for managing a file system, the file system comprising (a) a first object which includes one or more first pointers referencing one or more data blocks and (b) a second object which includes one or more second pointers referencing one or more data blocks, the computer program including instructions that, when run on the processing unit of the storage apparatus, causes the processing unit to perform processes comprising:

forming a relationship between at least one data block of the one or more data blocks, which is owned by the first object and referenced by the one or more first pointers, and which is also referenced by the one or more second pointers;

transferring, for the at least one data block, ownership of the at least one data block from the first object to the second object; and

removing the first object from the file system subsequent to such transfer of ownership from the first object to the second object.

2. The computer program product according to claim 1 , wherein: ownership of an owned data block indicates a responsibility for freeing the owned data block.

3. The computer program product according to claim 1 , wherein the second object is associated with a cloned-in-checkpoint number (CCN) and each pointer of the one or more second pointers is associated with a respective checkpoint number (CN); and

transferring ownership of a respective data block from the first object to the second object comprises:

setting a checkpoint number (CN) associated with a pointer of the one or more second pointers which references the respective checkpoint a value being greater or equal to the cloned-in-checkpoint number (CCN) associated with the second object and being less than a current checkpoint number of the file system; and

making the one or more first pointers of the first object sparse.

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

the first object is associated with another cloned-in-checkpoint number (CCN) and each pointer of the one or more first pointers is associated with a respective checkpoint number (CN).

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

an object owns a data block if the object includes a pointer, which references the respective data block, being associated with a checkpoint number which is greater than or equal to a cloned-in-checkpoint number associated with the object.

6. The computer program product according to claim 3 , wherein:

the cloned-in-checkpoint number associated with the second object indicates an earliest checkpoint of the file system from which data of the second object can diverge from data of the first object.

7. The computer program product according to claim 1 , wherein:

the second object is linked to the first object, and the first object is linked to another first object, and

upon removing the first object from the file system, the second object is linked to the other first object.

8. The computer program product according to claim 1 , wherein:

such transfer of ownership from the first object to the second object and removing the first object is performed when it is determined that a reference count of the first object becomes one.

9. The computer program product according to claim 8 , wherein:

a reference count of the first object becomes one when another second object being linked to the first object is deleted, the other second object being previously created as a clone of the second object.

10. The computer program product according to claim 9 , wherein:

the other second object is associated with another cloned-in-checkpoint number indicating an earliest checkpoint of the file system from which data of the other second object can diverge from data of the first object and the data of the second object.

11. The computer program product according to claim 1 , wherein:

the second object is a writable file of the file system.

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

the first object is a hidden second object of the file system.

13. The computer program product according to claim 1 , wherein:

the first object is a read-only second object of the file system.

14. An apparatus for managing a file system, the apparatus comprising:

a storage system configured to store objects of the file system comprising a first object which includes one or more first pointers referencing one or more data blocks, and a second object which includes one or more second pointers referencing one or more data blocks; and

a processing unit configured to:

form a relationship between at least one data block of the one or more data blocks, which is owned by the first object and referenced by the one or more first pointers, and which is also referenced by the one or more second pointers;

transfer, for the at least one data block, ownership of the at least one data block from the first object to the second object; and

remove the first object from the file system subsequent to such transfer of ownership from the first object to the second object.

15. The computer program product according to claim 14 , wherein:

ownership of an owned data block indicates a responsibility for freeing the owned data block.

16. The computer program product according to claim 14 , wherein the second object is associated with a cloned-in-checkpoint number (CCN) and each pointer of the one or more second pointers is associated with a respective checkpoint number (CN); and

transferring ownership of a respective data block from the first object to the second object comprises:

setting a checkpoint number (CN) associated with a pointer of the one or more second pointers which references the respective checkpoint a value being greater or equal to the cloned-in-checkpoint number (CCN) associated with the second object and being less than a current checkpoint number of the file system; and

making the one or more first pointers of the first object sparse.

17. The computer program product according to claim 16 , wherein:

the first object is associated with another cloned-in-checkpoint number (CCN) and each pointer of the one or more first pointers is associated with a respective checkpoint number (CN).

18. The computer program product according to claim 16 ,

wherein an object owns a data block if the object includes a pointer, which references the respective data block, being associated with a checkpoint number which is greater than or equal to a cloned-in-checkpoint number associated with the object.

19. The computer program product according to claim 16 , wherein:

the cloned-in-checkpoint number associated with the second object indicates an earliest checkpoint of the file system from which data of the second object can diverge from data of the first object.

20. The computer program product according to claim 14 , wherein:

the second object is linked to the first object, and the first object is linked to another first object, and

upon removing the first object from the file system, the second object is linked to the other first object.

Assignments (2)
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 →