diff mbox series

ceph: dump the msg when receiving a corrupt snap trace

Message ID 20230102071001.590386-1-xiubli@redhat.com
State New
Headers show
Series ceph: dump the msg when receiving a corrupt snap trace | expand

Commit Message

Xiubo Li Jan. 2, 2023, 7:10 a.m. UTC
From: Xiubo Li <xiubli@redhat.com>

It's strange that we can see this when mounting, so we need to know
how the corrupted msg looks like.

Signed-off-by: Xiubo Li <xiubli@redhat.com>
---
 fs/ceph/mds_client.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
index 1ad85af49b45..43a9a17ed9eb 100644
--- a/fs/ceph/mds_client.c
+++ b/fs/ceph/mds_client.c
@@ -3724,6 +3724,8 @@  static void handle_reply(struct ceph_mds_session *session, struct ceph_msg *msg)
 		if (err) {
 			up_write(&mdsc->snap_rwsem);
 			close_sessions = true;
+			if (err == -EIO)
+				ceph_msg_dump(msg);
 			goto out_err;
 		}
 		downgrade_write(&mdsc->snap_rwsem);