storage/reflink: refuse to revert() dirty volume
This commit is contained in:
parent
677183d8a6
commit
18f9356c2c
@ -197,6 +197,9 @@ class ReflinkVolume(qubes.storage.Volume):
|
||||
_remove_file(self._path_revision(number, timestamp))
|
||||
|
||||
def revert(self, revision=None):
|
||||
if self.is_dirty():
|
||||
raise qubes.storage.StoragePoolException(
|
||||
'Cannot revert: {} is not cleanly stopped'.format(self.vid))
|
||||
if revision is None:
|
||||
number, timestamp = list(self.revisions.items())[-1]
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user