Skip to contentSkip to conversation

main - cache: fix warning test

PATCH Zdenek Kabelac 1 participant 1 message Feb 23, 2021

lore
Share & tools
lore
#0 lore raw
Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=b140bba9fe69f3bd4c89f15998b3e197fe9bf428
Commit:        b140bba9fe69f3bd4c89f15998b3e197fe9bf428
Parent:        ac09fa08aa7a10cc3f807830de5d625d499ed1b1
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Sat Feb 20 22:45:13 2021 +0100
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Tue Feb 23 14:56:47 2021 +0100

cache: fix warning test

The cache here is not 'writethough' - so print proper state (writeback or passthrough)

---
 tools/lvconvert.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/lvconvert.c +2 -2
index 8bd73bb53..83bdfd04b 100644
@@ -2032,8 +2032,8 @@ static int _lvconvert_split_and_remove_cachepool(struct cmd_context *cmd,
 					  display_lvname(lv));
 				return 0;
 			}
-			log_warn("WARNING: Uncaching of partially missing writethrough cache volume %s might destroy your data.",
-				 display_lvname(lv));
+			log_warn("WARNING: Uncaching of partially missing %s cache volume %s might destroy your data.",
+				 cache_mode_num_to_str(first_seg(seg->pool_lv)->cache_mode), display_lvname(lv));
 		}
 
 		if (!arg_count(cmd, yes_ARG) &&