]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
kclient: more helpful info for bad ceph_msg_put
authorSage Weil <sage@newdream.net>
Thu, 19 Jun 2008 18:36:41 +0000 (11:36 -0700)
committerSage Weil <sage@newdream.net>
Thu, 19 Jun 2008 18:36:41 +0000 (11:36 -0700)
src/kernel/messenger.c

index 1607127ba11a48588111a557bf5581a7d1d5eb23..4b07692395b87efdbf66fd0a2ce0f5aa62dd9160 100644 (file)
@@ -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));