storage/reflink: resize(): don't look for loopdevs if clean

This commit is contained in:
Rusty Bird 2018-09-09 20:01:22 +00:00
parent e7b7c253ac
commit 385ba91772
No known key found for this signature in database
GPG Key ID: 469D78F47AAF2ADF

View File

@ -240,10 +240,11 @@ class ReflinkVolume(qubes.storage.Volume):
try: # assume volume is not (cleanly) stopped ...
_resize_file(self._path_dirty, size)
self.size = size
except FileNotFoundError: # ... but it actually is.
_resize_file(self._path_clean, size)
self.size = size
self.size = size
return self
# resize any corresponding loop devices
out = _cmd('losetup', '--associated', self._path_dirty)