Skip to content

Commit bd75a44

Browse files
authored
fix(qcow2): read FileSR allocated size only when needed (#146)
Reading the allocated size systematically for FileVDI is costly and is only used by the GC for specific VDIs, this align the reading of the allocated size with the behavior of LVMVDI where it's only obtained when needed. For a SR of 20k (empty) QCOW2 VDIs, we get the scan to go from: ``` real 3m34.294s ``` to: ``` real 0m21.022s ``` For VDIs with data, this could be even bigger. Signed-off-by: Damien Thenot <damien.thenot@vates.tech>
1 parent 88c5c79 commit bd75a44

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

drivers/qcow2util.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,6 @@ def getInfo(
486486
cowinfo.sizeVirt = self.header["virtual_disk_size"]
487487
cowinfo.sizePhys = self.getSizePhys(path)
488488
cowinfo.hidden = self.getHidden(path)
489-
cowinfo.sizeAllocated = self.getAllocatedSize(path)
490489
if includeParent:
491490
parent_path = self.header["parent"]
492491
if parent_path != "":

0 commit comments

Comments
 (0)