From 8974b2cbc09715d81aebd57a402eb02b5ecd7f85 Mon Sep 17 00:00:00 2001 From: Bahtiar `kalkin-` Gadimov Date: Fri, 2 Sep 2016 19:45:31 +0200 Subject: [PATCH] Fix ThinVolume _size access --- qubes/storage/lvm.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/qubes/storage/lvm.py b/qubes/storage/lvm.py index b1d557d1..dddb852f 100644 --- a/qubes/storage/lvm.py +++ b/qubes/storage/lvm.py @@ -345,9 +345,9 @@ class ThinVolume(qubes.storage.Volume): ''' # pylint: disable=too-few-public-methods - def __init__(self, volume_group, **kwargs): + def __init__(self, volume_group, size=0, **kwargs): self.volume_group = volume_group - super(ThinVolume, self).__init__(**kwargs) + super(ThinVolume, self).__init__(size=size, **kwargs) if self.snap_on_start and self.source is None: msg = "snap_on_start specified on {!r} but no volume source set" @@ -362,6 +362,8 @@ class ThinVolume(qubes.storage.Volume): if not self._is_volatile: self._vid_snap = self.vid + '-snap' + self._size = size + @property def revisions(self): path = self.path + '-back'