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

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