Skip to contentSkip to conversation

master - dev_manager: no flush for extension

PATCH Zdenek Kabelac 1 participant 1 message Oct 25, 2015

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=f898cf7539149a54a121b0aae59076c2d647bb37
Commit:        f898cf7539149a54a121b0aae59076c2d647bb37
Parent:        844b00958492224c448b30f89ae5532bb6591fd2
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Sun Oct 25 20:41:19 2015 +0100
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Sun Oct 25 21:09:31 2015 +0100

dev_manager: no flush for extension

Recognize the target only 'extends' and do not enforce 'flush' in this case. Only the size reduction still requires flush (so disables usage of no_flush flag).

If some other targets do require flush before suspend, they have to explicitly ask for it.

---
 WHATS_NEW                  |    1 +
 lib/activate/dev_manager.c |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)
WHATS_NEW +1 -0
index 33d11a4..80a198a 100644
@@ -1,5 +1,6 @@
 Version 2.02.133 - 
 ======================================
+  Enforce flush for suspend only when volume size is reduced.
   Enable code which detects the need of flush during suspend.
   Ensure --use-policy will resize volume to fit below threshold.
   Correct percentage evaluation when checking thin-pool over threshold.
lib/activate/dev_manager.c +1 -1
index 1caa2d7..dc6d2fd 100644
@@ -3296,7 +3296,7 @@ static int _tree_action(struct dev_manager *dm, const struct logical_volume *lv,
 		if (!dm_tree_preload_children(root, dlid, DLID_SIZE))
 			goto_out;
 
-		if (dm_tree_node_size_changed(root))
+		if ((dm_tree_node_size_changed(root) < 0))
 			dm->flush_required = 1;
 
 		if (action == ACTIVATE) {