mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
libdm: thin pool target sends messages once
Clear send_messages flag when they have been delivered successfully. There is no need to validate it for all other activations of the same node in the dm_tree. Also add extra debug message which shows the reason for skipping sending of messages because the transaction_id has already the matching value.
This commit is contained in:
parent
e5c30061fc
commit
5658ec2bdc
@ -1,5 +1,6 @@
|
||||
Version 1.02.78 -
|
||||
===================================
|
||||
Process thin messages once to active thin pool target for dm_tree.
|
||||
Optimize out setting the same value or read_ahead.
|
||||
Add DM_ARRAY_SIZE public macro.
|
||||
Move syslog code out of signal handle in dmeventd.
|
||||
|
@ -1484,8 +1484,12 @@ static int _node_send_messages(struct dm_tree_node *dnode,
|
||||
if (!_thin_pool_status_transaction_id(dnode, &trans_id))
|
||||
goto_bad;
|
||||
|
||||
if (trans_id == seg->transaction_id)
|
||||
if (trans_id == seg->transaction_id) {
|
||||
if (!dm_list_empty(&seg->thin_messages))
|
||||
log_debug_activation("Thin pool transaction_id matches %" PRIu64
|
||||
", skipping messages.", trans_id);
|
||||
return 1; /* In sync - skip messages */
|
||||
}
|
||||
|
||||
if (trans_id != (seg->transaction_id - 1)) {
|
||||
log_error("Thin pool transaction_id=%" PRIu64 ", while expected: %" PRIu64 ".",
|
||||
@ -1784,9 +1788,12 @@ 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 &&
|
||||
!(r = _node_send_messages(dnode, uuid_prefix, uuid_prefix_len)))
|
||||
if (r && dnode->props.send_messages) {
|
||||
if (!(r = _node_send_messages(dnode, uuid_prefix, uuid_prefix_len)))
|
||||
stack;
|
||||
else
|
||||
dnode->props.send_messages = 0; /* messages posted */
|
||||
}
|
||||
|
||||
handle = NULL;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user