storage/reflink: update comment and whitespace
This commit is contained in:
parent
1fe2aff643
commit
6e592a56d7
@ -266,18 +266,16 @@ class ReflinkVolume(qubes.storage.Volume):
|
|||||||
@_coroutinized
|
@_coroutinized
|
||||||
@_locked
|
@_locked
|
||||||
def resize(self, size):
|
def resize(self, size):
|
||||||
''' Resize a read-write volume image; notify any corresponding
|
''' Resize a read-write volume; notify any corresponding loop
|
||||||
loop devices of the size change.
|
devices of the size change.
|
||||||
'''
|
'''
|
||||||
if not self.rw:
|
if not self.rw:
|
||||||
raise qubes.storage.StoragePoolException(
|
raise qubes.storage.StoragePoolException(
|
||||||
'Cannot resize: {} is read-only'.format(self.vid))
|
'Cannot resize: {} is read-only'.format(self.vid))
|
||||||
|
|
||||||
for path in (self._path_dirty, self._path_clean):
|
for path in (self._path_dirty, self._path_clean):
|
||||||
with suppress(FileNotFoundError):
|
with suppress(FileNotFoundError):
|
||||||
_resize_file(path, size)
|
_resize_file(path, size)
|
||||||
break
|
break
|
||||||
|
|
||||||
self._size = size
|
self._size = size
|
||||||
if path == self._path_dirty:
|
if path == self._path_dirty:
|
||||||
_update_loopdev_sizes(self._path_dirty)
|
_update_loopdev_sizes(self._path_dirty)
|
||||||
|
Loading…
Reference in New Issue
Block a user