Skip to content

Commit 8b0da5c

Browse files
lxbszidryomov
authored andcommitted
ceph: try to dump the msgs when decoding fails
When the msgs are corrupted we need to dump them and then it will be easier to dig what has happened and where the issue is. Signed-off-by: Xiubo Li <[email protected]> Reviewed-by: Milind Changire <[email protected]> Signed-off-by: Ilya Dryomov <[email protected]>
1 parent f7c2f4f commit 8b0da5c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

fs/ceph/mds_client.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -645,6 +645,7 @@ static int parse_reply_info(struct ceph_mds_session *s, struct ceph_msg *msg,
645645
err = -EIO;
646646
out_bad:
647647
pr_err("mds parse_reply err %d\n", err);
648+
ceph_msg_dump(msg);
648649
return err;
649650
}
650651

@@ -3538,6 +3539,7 @@ static void handle_forward(struct ceph_mds_client *mdsc,
35383539

35393540
bad:
35403541
pr_err("mdsc_handle_forward decode error err=%d\n", err);
3542+
ceph_msg_dump(msg);
35413543
}
35423544

35433545
static int __decode_session_metadata(void **p, void *end,
@@ -5258,6 +5260,7 @@ void ceph_mdsc_handle_fsmap(struct ceph_mds_client *mdsc, struct ceph_msg *msg)
52585260
bad:
52595261
pr_err("error decoding fsmap %d. Shutting down mount.\n", err);
52605262
ceph_umount_begin(mdsc->fsc->sb);
5263+
ceph_msg_dump(msg);
52615264
err_out:
52625265
mutex_lock(&mdsc->mutex);
52635266
mdsc->mdsmap_err = err;
@@ -5326,6 +5329,7 @@ void ceph_mdsc_handle_mdsmap(struct ceph_mds_client *mdsc, struct ceph_msg *msg)
53265329
bad:
53275330
pr_err("error decoding mdsmap %d. Shutting down mount.\n", err);
53285331
ceph_umount_begin(mdsc->fsc->sb);
5332+
ceph_msg_dump(msg);
53295333
return;
53305334
}
53315335

0 commit comments

Comments
 (0)