From 8d8047883ea56e633007f3bcca6e87e6cb14cef4 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Sat, 12 Oct 2019 23:38:56 +0200 Subject: [PATCH] cachevol: use writethrough for partial removal Instead of using 'noflush' option, switch cache_mode into WRITETHROUGH which does not require flushing, when user confirmed he does not want flushing for WRITEBACK (because of (partially) missing caching PV) --- tools/lvconvert.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/lvconvert.c b/tools/lvconvert.c index 14663e8df..f875ac7ad 100644 --- a/tools/lvconvert.c +++ b/tools/lvconvert.c @@ -1875,7 +1875,8 @@ static int _lvconvert_split_and_keep_cachevol(struct cmd_context *cmd, return 0; } - noflush = 1; + /* Switch internally to WRITETHROUGH which does not require flushing */ + cache_seg->cache_mode = CACHE_MODE_WRITETHROUGH; } if (!lv_detach_cache_vol(lv, noflush)) -- 2.43.5