Skip to content

Commit

Permalink
storage/reflink: volume usage(): omit wrong docstring
Browse files Browse the repository at this point in the history
It's neither correct to say that this is "volume disk usage from the
VM's perspective" (because an image file can be sparsified on the host,
e.g. by restoring a backup, cloning a VM, or 'fallocate --dig-holes')
nor that disk usage is "usually much lower from the host's perspective"
(because it's not unusual for a volume to have multiple image files with
lots of diverging data, e.g. revisions).

Hard to say anything there that's true, helpful, and not a novella.
  • Loading branch information
rustybird committed Feb 2, 2022
1 parent 24c14ae commit 1cc8497
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions qubes/storage/reflink.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,9 +348,6 @@ def size(self):

@property
def usage(self):
''' Return volume disk usage from the VM's perspective. It is
usually much lower from the host's perspective due to CoW.
'''
for path in (self._path_dirty, self._path_clean):
with suppress(FileNotFoundError):
return os.stat(path).st_blocks * 512
Expand Down

0 comments on commit 1cc8497

Please sign in to comment.