Skip to content

Commit

Permalink
storage/reflink: start(): no need to go through size() getter
Browse files Browse the repository at this point in the history
stop() updates the _size of a volatile volume. And after a crash,
88fa6b4 ("qubesd: at startup, stop storage for stopped qubes") takes
care of running stop() before the next start().
  • Loading branch information
rustybird committed Jan 23, 2022
1 parent 1a4fdc2 commit b50bcec
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions qubes/storage/reflink.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,10 +214,7 @@ def start(self): # pylint: disable=invalid-overridden-method
if self.snap_on_start or self.save_on_stop:
_copy_file(self._path_clean, self._path_dirty)
else:
# Preferably use the size of a leftover image, in case
# the volume was previously resized - but then a crash
# prevented qubes.xml serialization of the new size.
_create_sparse_file(self._path_dirty, self.size)
_create_sparse_file(self._path_dirty, self._size)
return self

@qubes.storage.Volume.locked
Expand Down

0 comments on commit b50bcec

Please sign in to comment.