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 |
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.
|