From 28f78ed3b851fad56c010af5556e05887f380774 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Mon, 26 Jun 2017 11:42:24 +0200 Subject: [PATCH] storage/lvm: minor fixes QubesOS/qubes-issues#2256 --- qubes/storage/lvm.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/qubes/storage/lvm.py b/qubes/storage/lvm.py index 1c5e66c25..8c1ca86b4 100644 --- a/qubes/storage/lvm.py +++ b/qubes/storage/lvm.py @@ -120,7 +120,7 @@ def list_volumes(self): # implementation detail volume continue config = { - 'pool': self.name, + 'pool': self, 'vid': vid, 'name': vid, 'volume_group': self.volume_group, @@ -305,8 +305,6 @@ def import_volume(self, src_volume): if not src_volume.save_on_stop: return self - src_path = src_volume.export() - # HACK: neat trick to speed up testing if you have same physical thin # pool assigned to two qubes-pools i.e: qubes_dom0 and test-lvm # pylint: disable=line-too-long @@ -316,7 +314,7 @@ def import_volume(self, src_volume): qubes_lvm(cmd, self.log) else: self.create() - + src_path = src_volume.export() cmd = ['sudo', 'dd', 'if=' + src_path, 'of=/dev/' + self.vid, 'conv=sparse'] subprocess.check_call(cmd)