mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
libdm: enhance tracing messages
Use new _node_name() and print name major:minor for thin-pool device.
This commit is contained in:
parent
04ae5007e3
commit
21c0b1134f
@ -1,5 +1,6 @@
|
||||
Version 1.02.101 -
|
||||
=================================
|
||||
Thin pool trace messages show a device name and major:minor.
|
||||
|
||||
Version 1.02.100 - 30th June 2015
|
||||
=================================
|
||||
|
@ -1456,7 +1456,9 @@ static int _thin_pool_status_transaction_id(struct dm_tree_node *dnode, uint64_t
|
||||
goto out;
|
||||
}
|
||||
|
||||
log_debug_activation("Thin pool transaction id: %" PRIu64 " status: %s.", *transaction_id, params);
|
||||
log_debug_activation("Found transaction id %" PRIu64 " for thin pool %s "
|
||||
"with status line: %s.",
|
||||
*transaction_id, _node_name(dnode), params);
|
||||
|
||||
r = 1;
|
||||
out:
|
||||
@ -1570,15 +1572,16 @@ static int _node_send_messages(struct dm_tree_node *dnode,
|
||||
if (trans_id == seg->transaction_id) {
|
||||
dnode->props.send_messages = 0; /* messages already committed */
|
||||
if (have_messages)
|
||||
log_debug_activation("Thin pool transaction_id matches %" PRIu64
|
||||
", skipping messages.", trans_id);
|
||||
log_debug_activation("Thin pool %s transaction_id matches %"
|
||||
PRIu64 ", skipping messages.",
|
||||
_node_name(dnode), trans_id);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Error if there are no stacked messages or id mismatches */
|
||||
if (trans_id != (seg->transaction_id - have_messages)) {
|
||||
log_error("Thin pool transaction_id is %" PRIu64 ", while expected %" PRIu64 ".",
|
||||
trans_id, seg->transaction_id - have_messages);
|
||||
log_error("Thin pool %s transaction_id is %" PRIu64 ", while expected %" PRIu64 ".",
|
||||
_node_name(dnode), trans_id, seg->transaction_id - have_messages);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1592,9 +1595,9 @@ static int _node_send_messages(struct dm_tree_node *dnode,
|
||||
if (!_thin_pool_status_transaction_id(dnode, &trans_id))
|
||||
return_0;
|
||||
if (trans_id != tmsg->message.u.m_set_transaction_id.new_id) {
|
||||
log_error("Thin pool transaction_id is %" PRIu64
|
||||
log_error("Thin pool %s transaction_id is %" PRIu64
|
||||
" and does not match expected %" PRIu64 ".",
|
||||
trans_id,
|
||||
_node_name(dnode), trans_id,
|
||||
tmsg->message.u.m_set_transaction_id.new_id);
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user