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
This commit is contained in:
Marek Marczykowski-Górecki 2017-08-06 12:47:58 +02:00
parent 8488d5dc72
commit a833692c63
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -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):