storage/reflink: add revision even if empty

It's sort of useful to be able to revert a volume that has only ever
been started once to its empty state. And the lvm_thin driver allows it
too, so why not.
This commit is contained in:
Rusty Bird 2018-09-09 20:01:12 +00:00
parent 850778b52a
commit 677183d8a6
No known key found for this signature in database
GPG Key ID: 469D78F47AAF2ADF

View File

@ -184,8 +184,6 @@ class ReflinkVolume(qubes.storage.Volume):
def _add_revision(self):
if self.revisions_to_keep == 0:
return
if _get_file_disk_usage(self._path_clean) == 0:
return
ctime = os.path.getctime(self._path_clean)
timestamp = qubes.storage.isodate(int(ctime))
_copy_file(self._path_clean,