neil / rpms / python-blivet

Forked from rpms/python-blivet a year ago
Clone

Blame SOURCES/0023-Use-LVM-PV-format-current_size-in-LVMVolumeGroupDevi.patch

d891b6
From 4103df5ddaae49d51640d01502e8456409a92be9 Mon Sep 17 00:00:00 2001
d891b6
From: Vojtech Trefny <vtrefny@redhat.com>
d891b6
Date: Thu, 5 May 2022 16:35:37 +0200
d891b6
Subject: [PATCH] Use LVM PV format current_size in
d891b6
 LVMVolumeGroupDevice._remove
d891b6
d891b6
The member format size is 0 when target size is not set.
d891b6
d891b6
Related: rhbz#2081278
d891b6
---
d891b6
 blivet/devices/lvm.py | 2 +-
d891b6
 1 file changed, 1 insertion(+), 1 deletion(-)
d891b6
d891b6
diff --git a/blivet/devices/lvm.py b/blivet/devices/lvm.py
d891b6
index feb92f2e..facb1b76 100644
d891b6
--- a/blivet/devices/lvm.py
d891b6
+++ b/blivet/devices/lvm.py
d891b6
@@ -289,7 +289,7 @@ class LVMVolumeGroupDevice(ContainerDevice):
d891b6
 
d891b6
         # do not run pvmove on empty PVs
d891b6
         member.format.update_size_info()
d891b6
-        if member.format.free < member.format.size:
d891b6
+        if member.format.free < member.format.current_size:
d891b6
             blockdev.lvm.pvmove(member.path)
d891b6
         blockdev.lvm.vgreduce(self.name, member.path)
d891b6
 
d891b6
-- 
d891b6
2.34.3
d891b6