Skip to contentSkip to conversation

master - cachevol: use writethrough for partial removal

PATCH Zdenek Kabelac 1 participant 1 message Oct 14, 2019

lore
Share & tools
lore
#0 lore raw
Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=8d8047883ea56e633007f3bcca6e87e6cb14cef4
Commit:        8d8047883ea56e633007f3bcca6e87e6cb14cef4
Parent:        77deadd3af81d5641e2e53e604efbfab2cb6d330
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Sat Oct 12 23:38:56 2019 +0200
Committer:     Zdenek Kabelac <[email protected]>
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(-)
tools/lvconvert.c +2 -1
index 14663e8..f875ac7 100644
@@ -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))