[lvm-devel] master - cachevol: use writethrough for partial removal
Zdenek Kabelac
zkabelac at sourceware.org
Mon Oct 14 13:22:25 UTC 2019
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=8d8047883ea56e633007f3bcca6e87e6cb14cef4
Commit: 8d8047883ea56e633007f3bcca6e87e6cb14cef4
Parent: 77deadd3af81d5641e2e53e604efbfab2cb6d330
Author: Zdenek Kabelac <zkabelac at redhat.com>
AuthorDate: Sat Oct 12 23:38:56 2019 +0200
Committer: Zdenek Kabelac <zkabelac at redhat.com>
CommitterDate: Mon Oct 14 15:15:14 2019 +0200
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 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/tools/lvconvert.c b/tools/lvconvert.c
index 14663e8..f875ac7 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))
More information about the lvm-devel
mailing list