Sfoglia il codice sorgente

storage/reflink: update _size during volatile volume stop

Rusty Bird 4 anni fa
parent
commit
b98c1814ee
1 ha cambiato i file con 2 aggiunte e 0 eliminazioni
  1. 2 0
      qubes/storage/reflink.py

+ 2 - 0
qubes/storage/reflink.py

@@ -226,6 +226,8 @@ class ReflinkVolume(qubes.storage.Volume):
         if self.save_on_stop:
             self._commit(self._path_dirty)
         else:
+            if not self.snap_on_start:
+                self._get_size()  # preserve manual resize of image
             _remove_file(self._path_dirty)
             _remove_file(self._path_clean)
         return self