diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2015-10-26 21:46:54 +0100 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2015-10-26 23:57:31 +0100 |
commit | ba41ee1dc94264f7ac8e61f8b1d56b10225b0d2f (patch) | |
tree | d5ce24552aa94e9aa807b72efbb0545629441354 | |
parent | b702d677477ff6b37678fe2b6c38969792c09359 (diff) | |
download | lvm2-ba41ee1dc94264f7ac8e61f8b1d56b10225b0d2f.tar.gz |
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.
-rw-r--r-- | WHATS_NEW | 2 | ||||
-rw-r--r-- | lib/activate/dev_manager.c | 7 |
2 files changed, 8 insertions, 1 deletions
@@ -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. diff --git a/lib/activate/dev_manager.c b/lib/activate/dev_manager.c index dc6d2fd29..964eef5af 100644 --- a/lib/activate/dev_manager.c +++ b/lib/activate/dev_manager.c @@ -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; |