diff options
author | Sage Weil <sage@newdream.net> | 2009-12-14 18:13:47 -0500 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2009-12-21 19:39:52 -0500 |
commit | 9ec7cab14e6de732d4e7c355fe67c5810c32c758 (patch) | |
tree | 2f512034bc7db2b4ca8fe47ceea06ac99a8cab40 /fs/ceph/messenger.c | |
parent | 93c20d98c29ccefa039c3843ccc37122caaf3d31 (diff) |
ceph: hex dump corrupt server data to KERN_DEBUG
Also, print fsid using standard format, NOT hex dump.
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/messenger.c')
-rw-r--r-- | fs/ceph/messenger.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/fs/ceph/messenger.c b/fs/ceph/messenger.c index d5eef76a253c..b10f88c56706 100644 --- a/fs/ceph/messenger.c +++ b/fs/ceph/messenger.c | |||
@@ -2115,3 +2115,23 @@ void ceph_msg_last_put(struct kref *kref) | |||
2115 | else | 2115 | else |
2116 | ceph_msg_kfree(m); | 2116 | ceph_msg_kfree(m); |
2117 | } | 2117 | } |
2118 | |||
2119 | void ceph_msg_dump(struct ceph_msg *msg) | ||
2120 | { | ||
2121 | pr_debug("msg_dump %p (front_max %d nr_pages %d)\n", msg, | ||
2122 | msg->front_max, msg->nr_pages); | ||
2123 | print_hex_dump(KERN_DEBUG, "header: ", | ||
2124 | DUMP_PREFIX_OFFSET, 16, 1, | ||
2125 | &msg->hdr, sizeof(msg->hdr), true); | ||
2126 | print_hex_dump(KERN_DEBUG, " front: ", | ||
2127 | DUMP_PREFIX_OFFSET, 16, 1, | ||
2128 | msg->front.iov_base, msg->front.iov_len, true); | ||
2129 | if (msg->middle) | ||
2130 | print_hex_dump(KERN_DEBUG, "middle: ", | ||
2131 | DUMP_PREFIX_OFFSET, 16, 1, | ||
2132 | msg->middle->vec.iov_base, | ||
2133 | msg->middle->vec.iov_len, true); | ||
2134 | print_hex_dump(KERN_DEBUG, "footer: ", | ||
2135 | DUMP_PREFIX_OFFSET, 16, 1, | ||
2136 | &msg->footer, sizeof(msg->footer), true); | ||
2137 | } | ||