[PATCH] Fix LVMLogicalVolumeDevice.maxSize.
Chris Lumens
clumens at redhat.com
Wed Mar 20 21:04:26 UTC 2013
> diff --git a/blivet/devices.py b/blivet/devices.py
> index 05707e9..0ac65f3 100644
> --- a/blivet/devices.py
> +++ b/blivet/devices.py
> @@ -2484,6 +2484,11 @@ class LVMLogicalVolumeDevice(DMDevice):
> size = property(StorageDevice._getSize, _setSize)
>
> @property
> + def maxSize(self):
> + """ The maximum size this lv can be. """
> + return min(self.format.maxSize, self.size + self.vg.freeSpace)
> +
> + @property
> def vgSpaceUsed(self):
> """ Space occupied by this LV, not including snapshots. """
> return (self.vg.align(self.size, roundup=True) * self.stripes
Looks good, and enables my spinner removal patch to go forward.
- Chris
More information about the anaconda-patches
mailing list