Skip to contentSkip to conversation

master - libdm: better debug message

PATCH Zdenek Kabelac 1 participant 1 message Jun 15, 2015

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=9a06ae7b35f4355e7be14b5fae2865b85fc60fc2
Commit:        9a06ae7b35f4355e7be14b5fae2865b85fc60fc2
Parent:        ac6b3559780ccabc8cd46353e10520677b3c1277
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Thu Jun 4 08:45:22 2015 +0200
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Mon Jun 15 14:48:04 2015 +0200

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(-)
WHATS_NEW_DM +1 -0
index 724b1c7..dda2777 100644
@@ -1,5 +1,6 @@
 Version 1.02.99 - 
 ================================
+  Enhance error message when thin-pool message fails.
 
 Version 1.02.98 - 12th June 2015
 ================================
libdm/libdm-deptree.c +5 -3
index 578f645..1602c62 100644
@@ -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: