From: Zdenek Kabelac Date: Sun, 25 Oct 2015 19:41:19 +0000 (+0100) Subject: dev_manager: no flush for extension X-Git-Tag: v2_02_133~51 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=f898cf7539149a54a121b0aae59076c2d647bb37;p=lvm2.git 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. --- diff --git a/WHATS_NEW b/WHATS_NEW index 33d11a46d..80a198a03 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -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. diff --git a/lib/activate/dev_manager.c b/lib/activate/dev_manager.c index 1caa2d77a..dc6d2fd29 100644 --- a/lib/activate/dev_manager.c +++ b/lib/activate/dev_manager.c @@ -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) {