master - thin: limit no-flush using only for thin-pool
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=ba41ee1dc94264f7ac8e61f8b1d56b10225b0d2f Commit: ba41ee1dc94264f7ac8e61f8b1d56b10225b0d2f Parent: b702d677477ff6b37678fe2b6c38969792c09359 Author: Zdenek Kabelac <[email protected]> AuthorDate: Mon Oct 26 21:46:54 2015 +0100 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Mon Oct 26 23:57:31 2015 +0100
thin: limit no-flush using only for thin-pool
For this release keep usage of 'noflush' only for thin-volume/pool.
For rest of keep - keep usage of 'noflush' flag purely for non-resized mirrors.
--- WHATS_NEW | 2 +- lib/activate/dev_manager.c | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletions(-)
WHATS_NEW +1 -1
@@ -1,6 +1,6 @@ Version 2.02.133 - ====================================== - Enforce flush for suspend only when volume size is reduced. + For thins use 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 +7 -0
@@ -3299,6 +3299,13 @@ static int _tree_action(struct dev_manager *dm, const struct logical_volume *lv,if ((dm_tree_node_size_changed (root) <0 )) dm->flush_required =1 ; +/* Currently keep the code require flush for any +* non 'thin pool/volume, mirror' or with any size change */ +if (!lv_is_thin_volume (lv) && + !lv_is_thin_pool (lv) && + (!lv_is_mirror (lv) ||dm_tree_node_size_changed (root))) + dm->flush_required =1 ; +if (action ==ACTIVATE ) {if (!dm_tree_activate_children (root, dlid,DLID_SIZE )) goto_out;