From 297d5915c3c927cba3a63bc9d6d1747271d06641 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Thu, 7 Dec 2017 17:52:01 +0100 Subject: [PATCH] libdm: avoid checking status on activation Variable props.send_messages has 3 states and was not used properly here. Activation in this moment does not need to verify thin-pool status as that has been already checked on preload. So only if there are some real messages (value 2) call function for sending them. --- WHATS_NEW_DM | 1 + libdm/libdm-deptree.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM index dfa5a97b9..d9503c222 100644 --- a/WHATS_NEW_DM +++ b/WHATS_NEW_DM @@ -1,5 +1,6 @@ Version 1.02.146 - ==================================== + Activation tree of thin pool skips duplicated check of pool status. Remove code supporting replicator target. Do not ignore failure of _info_by_dev(). Propagate delayed resume for pvmove subvolumes. diff --git a/libdm/libdm-deptree.c b/libdm/libdm-deptree.c index ef5da59e0..f463eab3c 100644 --- a/libdm/libdm-deptree.c +++ b/libdm/libdm-deptree.c @@ -1920,7 +1920,7 @@ int dm_tree_activate_children(struct dm_tree_node *dnode, * resume should continue further, just whole command * has to report failure. */ - if (r && dnode->props.send_messages && + if (r && (dnode->props.send_messages > 1) && !(r = _node_send_messages(dnode, uuid_prefix, uuid_prefix_len, 1))) stack;