summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2019-10-12 23:38:56 +0200
committerZdenek Kabelac <zkabelac@redhat.com>2019-10-14 15:15:14 +0200
commit8d8047883ea56e633007f3bcca6e87e6cb14cef4 (patch)
treed66a889289b929ab806a70c87517b184276d5e18
parent77deadd3af81d5641e2e53e604efbfab2cb6d330 (diff)
downloadlvm2-8d8047883ea56e633007f3bcca6e87e6cb14cef4.tar.gz
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)
-rw-r--r--tools/lvconvert.c3
1 files changed, 2 insertions, 1 deletions
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))