Forráskód Böngészése

storage/lvm: extend volume snapshot of running VM too

Extend both backing volume as well as current snapshot, so the increased
size is visible immediately to the user.

Fixes QubesOS/qubes-issues#2982
Marek Marczykowski-Górecki 6 éve
szülő
commit
a833692c63
1 módosított fájl, 3 hozzáadás és 0 törlés
  1. 3 0
      qubes/storage/lvm.py

+ 3 - 0
qubes/storage/lvm.py

@@ -377,6 +377,9 @@ class ThinVolume(qubes.storage.Volume):
 
         cmd = ['extend', self.vid, str(size)]
         qubes_lvm(cmd, self.log)
+        if self.is_dirty():
+            cmd = ['extend', self._vid_snap, str(size)]
+            qubes_lvm(cmd, self.log)
         reset_cache()
 
     def _snapshot(self):