Skip to contentSkip to conversation

main - thinpool: correct condition

PATCH Zdenek Kabelac 1 participant 1 message Mar 15, 2021

lore
Share & tools
lore
#0 lore raw
Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=bbac843268ab353bb80a7f09841ff467bdcdeb04
Commit:        bbac843268ab353bb80a7f09841ff467bdcdeb04
Parent:        262008f1ceb050a9eed64f2fa50b1bc9366b9e75
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Thu Mar 11 13:33:24 2021 +0100
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Fri Mar 12 12:59:55 2021 +0100

thinpool: correct condition

Actually we do want to flush thin-pool message for particular LV first. Existing condition evaluated to noop.

---
 lib/metadata/lv_manip.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/metadata/lv_manip.c +1 -1
index 4114e7d5c..2c77bacc2 100644
@@ -6707,7 +6707,7 @@ int lv_remove_single(struct cmd_context *cmd, struct logical_volume *lv,
 	}
 
 	/* Clear thin pool stacked messages */
-	if (pool_lv && !pool_has_message(first_seg(pool_lv), lv, 0) &&
+	if (pool_lv && pool_has_message(first_seg(pool_lv), lv, 0) &&
 	    !update_pool_lv(pool_lv, 1)) {
 		if (force < DONT_PROMPT_OVERRIDE) {
 			log_error("Failed to update pool %s.", display_lvname(pool_lv));