IP Library Granted Patent US 11,494,334
Granted Patent B2
US 11,494,334 · App. 17/119,959 · Granted Nov 8, 2022

Embedded reference counts for file clones

Inventors: Sriram Patil (San Jose, CA); Abhay Kumar Jain (Cupertino, CA); Wenguang Wang (Santa Clara, CA); Nitin Rastogi (San Bruno, CA); Pranay Singh (San Ramon, CA); Richard P. Spillane (Mountain View, CA)
Assignee: VMWARE INC.
G06F16/128G06F16/1748G06F16/185
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 11,494,334
App. No.
17/119,959
Granted
Nov 8, 2022
Kind
B2
Abstract

Techniques for efficiently managing a file clone from a filesystem which supports efficient volume snapshots are provided. In some embodiments, a system may receive an instruction to remove the file clone from the filesystem. The file clone may be a point-in-time copy of metadata of an original file. The system may further—for a file map entry in a filesystem tree associated with the file clone, the file map entry indicating a data block—decrement a reference count in a reference count entry associated with the file map entry. The reference count entry may be stored in the filesystem tree according to a key and the key may comprise an identification of the original file. The system may further reclaim the data block in a storage system when the reference count is zero.

Claims (50)

1. A method for removing a file clone from a filesystem comprising:

receiving an instruction to remove the file clone from the filesystem, wherein the file clone is a point-in-time copy of metadata of an original file;

for a file map entry in a filesystem tree associated with the file clone, the file map entry identifying a data block:

decrementing a reference count in a reference count entry associated with the file map entry, wherein the reference count entry is stored in the filesystem tree according to a key and the key comprises an identification of the original file; and

reclaiming the data block in a storage system based on the reference count, wherein the data block is reclaimed when the reference count is zero.

2. The method of claim 1 , further comprising:

for the file map entry in the filesystem tree associated with the file clone:

reclaiming the physical block in the storage system associated with the file map entry further based on at least one snapshot of the filesystem tree, wherein the data block is reclaimed when the reference count is zero and the physical block is not shared with the at least one snapshot of the filesystem tree,

wherein the previous snapshot and the next snapshot are a point-in-time copies of the filesystem tree.

3. The method of claim 1 , further comprising:

for the file map entry in the filesystem tree associated with the file clone:

removing the file map entry from the filesystem tree.

4. The method of claim 1 , wherein the decrementing is performed when a cloned flag is set in the file map entry, wherein the file map entry includes a cloned flag and the cloned flag indicates that the file clone is a clone of another file.

5. The method of claim 1 , wherein the reference count entry is added to the filesystem tree when the original file is cloned to produce the file clone.

6. The method of claim 1 , wherein the data block is retained when the reference count is greater than zero.

7. The method of claim 1 , wherein a plurality of reference count entries associated with the file clone are arranged contiguously in the filesystem tree using the key and the key further comprises an identification of the data block.

8. A non-transitory computer-readable storage medium containing instructions, that when executed, control a computer system to be operable for:

receiving an instruction to remove the file clone from the filesystem, wherein the file clone is a point-in-time copy of metadata of an original file;

for a file map entry in a filesystem tree associated with the file clone, the file map entry identifying a data block:

decrementing a reference count in a reference count entry associated with the file map entry, wherein the reference count entry is stored in the filesystem tree according to a key and the key comprises an identification of the original file; and

reclaiming the data block in a storage system based on the reference count, wherein the data block is reclaimed when the reference count is zero.

9. The non-transitory computer-readable storage medium of claim 8 , further operable for:

for the file map entry in the filesystem tree associated with the file clone:

reclaiming the physical block in the storage system associated with the file map entry further based on at least one snapshot of the filesystem tree, wherein the data block is reclaimed when the reference count is zero and the physical block is not shared with the at least one snapshot of the filesystem tree,

wherein the previous snapshot and the next snapshot are a point-in-time copies of the filesystem tree.

10. The non-transitory computer-readable storage medium of claim 8 , further operable for:

for the file map entry in the filesystem tree associated with the file clone:

removing the file map entry from the filesystem tree.

11. The non-transitory computer-readable storage medium of claim 8 , wherein the decrementing is performed when a cloned flag is set in the file map entry, wherein the file map entry includes a cloned flag and the cloned flag indicates that the file clone is a clone of another file.

12. The non-transitory computer-readable storage medium of claim 8 , wherein the reference count entry is added to the filesystem tree when the original file is cloned to produce the file clone.

13. The non-transitory computer-readable storage medium of claim 8 , wherein the data block is retained when the reference count is greater than zero.

14. The non-transitory computer-readable storage medium of claim 8 , wherein a plurality of reference count entries associated with the file clone are arranged contiguously in the filesystem tree using the key and the key further comprises an identification of the data block.

15. An apparatus comprising:

one or more computer processors; and

a non-transitory computer-readable storage medium comprising instructions, that when executed, control the one or more computer processors to be operable for:

receiving an instruction to remove the file clone from the filesystem, wherein the file clone is a point-in-time copy of metadata of an original file;

for a file map entry in a filesystem tree associated with the file clone, the file map entry identifying a data block:

decrementing a reference count in a reference count entry associated with the file map entry, wherein the reference count entry is stored in the filesystem tree according to a key and the key comprises an identification of the original file; and

reclaiming the data block in a storage system based on the reference count, wherein the data block is reclaimed when the reference count is zero.

16. The apparatus of claim 15 , further operable for:

for the file map entry in the filesystem tree associated with the file clone:

reclaiming the physical block in the storage system associated with the file map entry further based on at least one snapshot of the filesystem tree, wherein the data block is reclaimed when the reference count is zero and the physical block is not shared with the at least one snapshot of the filesystem tree,

wherein the previous snapshot and the next snapshot are a point-in-time copies of the filesystem tree.

17. The apparatus of claim 15 , further operable for:

for the file map entry in the filesystem tree associated with the file clone:

removing the file map entry from the filesystem tree.

18. The apparatus of claim 15 , wherein the decrementing is performed when a cloned flag is set in the file map entry, wherein the file map entry includes a cloned flag and the cloned flag indicates that the file clone is a clone of another file.

19. The apparatus of claim 15 , wherein the reference count entry is added to the filesystem tree when the original file is cloned to produce the file clone.

20. The apparatus of claim 15 , wherein the data block is retained when the reference count is greater than zero.

21. The apparatus of claim 15 , wherein a plurality of reference count entries associated with the file clone are arranged contiguously in the filesystem tree using the key and the key further comprises an identification of the data block.

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 Dec 15, 2020
From: PATIL, SRIRAM; JAIN, ABHAY; WANG, WENGUANG; RASTOGI, NITIN; SINGH, PRANAY; SPILLANE, RICHARD P
To: VMWARE INC.
Reel/Frame 054655/0338 →
Continuity (1)
Related Publication 20220188267A1 · Jun 16, 2022