storage/file: fix disk usage reporting
Do not report root image usage in template-based VMs. This space is used only once - by template.
This commit is contained in:
parent
8a8674bb57
commit
b9c217704c
@ -337,7 +337,13 @@ class FileVolume(qubes.storage.Volume):
|
||||
@property
|
||||
def usage(self):
|
||||
''' Returns the actualy used space '''
|
||||
return get_disk_usage(self.vid)
|
||||
usage = 0
|
||||
if self.save_on_stop or self.snap_on_start:
|
||||
usage = get_disk_usage(self.path_cow)
|
||||
if self.save_on_stop or not self.snap_on_start:
|
||||
usage += get_disk_usage(self.path)
|
||||
return usage
|
||||
|
||||
|
||||
|
||||
def create_sparse_file(path, size):
|
||||
|
Loading…
Reference in New Issue
Block a user