瀏覽代碼

storage/reflink: delete all images at beginning of create()

Ensure that there are no leftover image files for the volume, e.g. from
an unsuccessful removal of a previous incarnation of this vid, or from
an messily restored pool filesystem backup. We don't want to preserve
any stale data (revisions) or metadata (size) in the new incarnation.
Rusty Bird 4 年之前
父節點
當前提交
6659ed8d39
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      qubes/storage/reflink.py

+ 1 - 0
qubes/storage/reflink.py

@@ -154,6 +154,7 @@ class ReflinkVolume(qubes.storage.Volume):
     @_coroutinized
     @_locked
     def create(self):
+        self._remove_all_images()
         if self.save_on_stop and not self.snap_on_start:
             _create_sparse_file(self._path_clean, self._get_size())
         return self