Hello community, here is the log from the commit of package lvm2 for openSUSE:Leap:15.2 checked in at 2020-06-04 16:01:45 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Leap:15.2/lvm2 (Old) and /work/SRC/openSUSE:Leap:15.2/.lvm2.new.3606 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "lvm2" Thu Jun 4 16:01:45 2020 rev:56 rq:810933 version:2.03.05 Changes: -------- --- /work/SRC/openSUSE:Leap:15.2/lvm2/lvm2.changes 2020-05-19 14:08:47.779035419 +0200 +++ /work/SRC/openSUSE:Leap:15.2/.lvm2.new.3606/lvm2.changes 2020-06-04 16:03:26.055472229 +0200 @@ -1,0 +2,6 @@ +Wed May 27 13:00:58 UTC 2020 - [email protected] + +- removing LVM cache with cache volume does not remove the cache volume (bsc#1171907) + + bug-1171907-lvremove-remove-attached-cachevol-with-removed-LV.patch + +------------------------------------------------------------------- New: ---- bug-1171907-lvremove-remove-attached-cachevol-with-removed-LV.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ lvm2.spec ++++++ --- /var/tmp/diff_new_pack.9mN4Lw/_old 2020-06-04 16:03:26.775474638 +0200 +++ /var/tmp/diff_new_pack.9mN4Lw/_new 2020-06-04 16:03:26.779474652 +0200 @@ -93,6 +93,7 @@ Patch0036: bug-1150021_05-bcache-bcache_invalidate_fd-only-remove-prefixes-on.patch Patch0037: bug-1150021_06-fix-dev_unset_last_byte-after-write-error.patch Patch0038: bug-1157736-add-suggestion-message-for-mirror-LVs.patch +Patch0039: bug-1171907-lvremove-remove-attached-cachevol-with-removed-LV.patch # SUSE patches: 1000+ for LVM # Never upstream Patch1001: cmirrord_remove_date_time_from_compilation.patch @@ -185,6 +186,7 @@ %patch0036 -p1 %patch0037 -p1 %patch0038 -p1 +%patch0039 -p1 %patch1001 -p1 %patch1002 -p1 %patch1003 -p1 ++++++ bug-1171907-lvremove-remove-attached-cachevol-with-removed-LV.patch ++++++ change this patch from: if (!lv_detach_cache_vol(lv, 0)) { to : if (!lv_detach_cache_vol(lv)) { by [email protected] --- >From 56aadd7fe2a1d24043ea9d06543c29317ac1cc58 Mon Sep 17 00:00:00 2001 From: David Teigland <[email protected]> Date: Tue, 24 Sep 2019 13:46:40 -0500 Subject: [PATCH] lvremove: remove attached cachevol with removed LV When an LV is removed that has an attached cachevol, also remove the cachevol LV. --- lib/metadata/lv_manip.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c index 79e3d15..f404555 100644 --- a/lib/metadata/lv_manip.c +++ b/lib/metadata/lv_manip.c @@ -6283,10 +6283,16 @@ int lv_remove_single(struct cmd_context *cmd, struct logical_volume *lv, return_0; if (lv_is_cache(lv) && lv_is_cache_vol(first_seg(lv)->pool_lv)) { + struct logical_volume *cachevol_lv = first_seg(lv)->pool_lv; + if (!lv_detach_cache_vol(lv)) { log_error("Failed to detach cache from %s", display_lvname(lv)); return 0; } + if (!lv_remove_single(cmd, cachevol_lv, force, suppress_remove_message)) { + log_error("Failed to remove cachevol %s.", display_lvname(cachevol_lv)); + return 0; + } } /* FIXME Ensure not referred to by another existing LVs */ -- 1.8.3.1
