From dcb520bf9e5b2c12530d3866c14e0339bce42ab7 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 19 Jun 2008 11:36:41 -0700 Subject: [PATCH] kclient: more helpful info for bad ceph_msg_put --- src/kernel/messenger.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/kernel/messenger.c b/src/kernel/messenger.c index 1607127ba11a4..4b07692395b87 100644 --- a/src/kernel/messenger.c +++ b/src/kernel/messenger.c @@ -1896,7 +1896,16 @@ void ceph_msg_put(struct ceph_msg *m) { dout(20, "ceph_msg_put %p %d -> %d\n", m, atomic_read(&m->nref), atomic_read(&m->nref)-1); - BUG_ON(atomic_read(&m->nref) <= 0); + if (atomic_read(&m->nref) <= 0) { + derr(0, "bad ceph_msg_put on %p %u from %s%d %d=%s len %d+%d\n", + m, le32_to_cpu(m->hdr.seq), + ENTITY_NAME(m->hdr.src.name), + le32_to_cpu(m->hdr.type), + ceph_msg_type_name(le32_to_cpu(m->hdr.type)), + le32_to_cpu(m->hdr.front_len), + le32_to_cpu(m->hdr.data_len)); + WARN(); + } if (atomic_dec_and_test(&m->nref)) { dout(20, "ceph_msg_put last one on %p\n", m); WARN_ON(!list_empty(&m->list_head)); -- 2.39.5