US 12,086,102 B2
Usage correction in a file system
Somesh Jain, Pashan (IN); Shubham Agarwal, Rajasthan (IN); and Rohit Singh, Ghaziabad (IN)
Filed by Druva Inc., Santa Clara, CA (US)
Filed on Jan. 11, 2023, as Appl. No. 18/095,953.
Claims priority of application No. 202241002128 (IN), filed on Jan. 13, 2022.
Prior Publication US 2023/0222097 A1, Jul. 13, 2023
Int. Cl. G06F 16/172 (2019.01); G06F 11/14 (2006.01); G06F 16/11 (2019.01); G06F 16/13 (2019.01); G06F 16/16 (2019.01); G06F 16/174 (2019.01); G06F 16/903 (2019.01)
CPC G06F 16/128 (2019.01) [G06F 11/1435 (2013.01); G06F 11/1453 (2013.01); G06F 11/1466 (2013.01); G06F 11/1469 (2013.01); G06F 16/125 (2019.01); G06F 16/13 (2019.01); G06F 16/162 (2019.01); G06F 16/172 (2019.01); G06F 16/1744 (2019.01); G06F 16/1748 (2019.01); G06F 16/90335 (2019.01); G06F 2201/84 (2013.01)] 20 Claims
OG exemplary drawing
 
1. A computer-implemented method for usage correction for a file system, the computer-implemented method comprising:
maintaining a total-size counter for the file system, the total-size counter representing a sum of data size in the file system;
performing a plurality of data operation cycles to the file system, wherein at least one of the data operation cycles corresponds to a snapshot that comprises files, the at least one of the data operation cycles comprises:
incrementing the total-size counter by data size of the files in the snapshot exchanged with the file system, wherein an amount of increment is measured through the data operation cycle,
creating a snapshot record corresponding to the snapshot, and
adding, to the snapshot record, the amount of increment in incrementing the total-size counter as an increment-size counter; and
performing a correction operation to correct the total-size counter for the file system for the plurality of data operation cycles, the correction operation changing the total-size counter by a difference between (a) a total of the increment-size counters stored in a plurality of snapshot records corresponding to the plurality of data operation cycles and (b) a total data size of file data that are exchanged with the file system in the plurality of data operation cycles.