summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2015-07-01 13:29:32 +0200
committerZdenek Kabelac <zkabelac@redhat.com>2015-07-01 13:44:28 +0200
commit21c0b1134f7812300aea1e24da11ac1d93bac7b5 (patch)
tree136c09875faeeee1aebd00bdd7d898b0a5410e40
parent04ae5007e3952c3d071cfcd03e03db87332b9027 (diff)
downloadlvm2-21c0b1134f7812300aea1e24da11ac1d93bac7b5.tar.gz
libdm: enhance tracing messages
Use new _node_name() and print name major:minor for thin-pool device.
-rw-r--r--WHATS_NEW_DM1
-rw-r--r--libdm/libdm-deptree.c17
2 files changed, 11 insertions, 7 deletions
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index 91643af9a..38045d681 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -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
=================================
diff --git a/libdm/libdm-deptree.c b/libdm/libdm-deptree.c
index cb43afed1..e344d1aaf 100644
--- a/libdm/libdm-deptree.c
+++ b/libdm/libdm-deptree.c
@@ -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;
}