From 9a06ae7b35f4355e7be14b5fae2865b85fc60fc2 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Thu, 4 Jun 2015 08:45:22 +0200 Subject: [PATCH] libdm: better debug message Print reason for failing ioctl if thin pool message fails. --- WHATS_NEW_DM | 1 + libdm/libdm-deptree.c | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM index 724b1c7dd..dda2777e9 100644 --- a/WHATS_NEW_DM +++ b/WHATS_NEW_DM @@ -1,5 +1,6 @@ Version 1.02.99 - ================================ + Enhance error message when thin-pool message fails. Version 1.02.98 - 12th June 2015 ================================ diff --git a/libdm/libdm-deptree.c b/libdm/libdm-deptree.c index 578f64597..1602c6207 100644 --- a/libdm/libdm-deptree.c +++ b/libdm/libdm-deptree.c @@ -1506,11 +1506,13 @@ static int _thin_pool_node_message(struct dm_tree_node *dnode, struct thin_messa if (!dm_task_set_message(dmt, buf)) goto_out; - /* Internal functionality of dm_task */ + /* Internal functionality of dm_task */ dmt->expected_errno = tm->expected_errno; - if (!dm_task_run(dmt)) - goto_out; + if (!dm_task_run(dmt)) { + log_error("Failed to process thin pool message \"%s\".", buf); + goto out; + } r = 1; out: