[sheepdog] [PATCH 2/3 v2] sheep: improve cluster request debugging

Christoph Hellwig hch at infradead.org
Mon Jul 16 10:44:11 CEST 2012


Add a few more printfs, print the symbolic command name where available.

Signed-off-by: Christoph Hellwig <hch at lst.de>

---
 sheep/group.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Index: sheepdog/sheep/group.c
===================================================================
--- sheepdog.orig/sheep/group.c	2012-07-16 10:31:22.386785041 +0200
+++ sheepdog/sheep/group.c	2012-07-16 10:31:50.530118804 +0200
@@ -287,6 +287,8 @@ static void cluster_op_done(struct work
 
 	cluster_op_running = false;
 
+	dprintf("%s (%p)\n", op_name(req->op), req);
+
 	msg = prepare_cluster_msg(req, &size);
 	if (!msg)
 		panic();
@@ -848,7 +850,8 @@ void sd_notify_handler(struct sd_node *s
 	int ret = msg->rsp.result;
 	struct request *req = NULL;
 
-	dprintf("size: %zd, from: %s\n", data_len, node_to_str(sender));
+	dprintf("op %s, size: %zd, from: %s\n",
+		op_name(op), data_len, node_to_str(sender));
 
 	if (is_myself(sender->nid.addr, sender->nid.port)) {
 		req = list_first_entry(&sys->pending_list, struct request,



More information about the sheepdog mailing list