Skip to content

Commit

Permalink
Fix VDI.getAllocatedSize
Browse files Browse the repository at this point in the history
Signed-off-by: Damien Thenot <damien.thenot@vates.tech>
  • Loading branch information
Nambrok committed Nov 27, 2024
1 parent e207c0a commit f3ece17
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/cleanup.py
Original file line number Diff line number Diff line change
Expand Up @@ -1193,6 +1193,11 @@ def delete(self):
raise util.SMException("os.unlink(%s) failed" % self.path)
VDI.delete(self)

def getAllocatedSize(self):
if self._sizeAllocated == -1:
self._sizeAllocated = vhdutil.getAllocatedSize(self.path)
return self._sizeAllocated


class LVHDVDI(VDI):
"""Object representing a VDI in an LVHD SR"""
Expand Down

0 comments on commit f3ece17

Please sign in to comment.