From: Xiubo Li <xiubli@xxxxxxxxxx> Print the logs in error level to give a helpful hint to make it more user-friendly to debug. URL: https://tracker.ceph.com/issues/44215 Signed-off-by: Xiubo Li <xiubli@xxxxxxxxxx> --- fs/ceph/super.c | 8 ++++++-- net/ceph/mon_client.c | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/fs/ceph/super.c b/fs/ceph/super.c index c7f150686a53..e33c2f86647b 100644 --- a/fs/ceph/super.c +++ b/fs/ceph/super.c @@ -905,8 +905,10 @@ static struct dentry *ceph_real_mount(struct ceph_fs_client *fsc, fsc->mount_options->server_path + 1 : ""; err = __ceph_open_session(fsc->client, started); - if (err < 0) + if (err < 0) { + pr_err("mount joining the ceph cluster fail %d\n", err); goto out; + } /* setup fscache */ if (fsc->mount_options->flags & CEPH_MOUNT_OPT_FSCACHE) { @@ -922,6 +924,8 @@ static struct dentry *ceph_real_mount(struct ceph_fs_client *fsc, root = open_root_dentry(fsc, path, started); if (IS_ERR(root)) { err = PTR_ERR(root); + pr_err("mount opening the root directory fail %d\n", + err); goto out; } fsc->sb->s_root = dget(root); @@ -1079,7 +1083,7 @@ static int ceph_get_tree(struct fs_context *fc) out_splat: if (!ceph_mdsmap_is_cluster_available(fsc->mdsc->mdsmap)) { - pr_info("No mds server is up or the cluster is laggy\n"); + pr_err("No mds server is up or the cluster is laggy\n"); err = -EHOSTUNREACH; } diff --git a/net/ceph/mon_client.c b/net/ceph/mon_client.c index 9d9e4e4ea600..6f1372f5f2a7 100644 --- a/net/ceph/mon_client.c +++ b/net/ceph/mon_client.c @@ -1179,6 +1179,8 @@ static void handle_auth_reply(struct ceph_mon_client *monc, if (ret < 0) { monc->client->auth_err = ret; + pr_err("authenticate fail on mon%d %s\n", monc->cur_mon, + ceph_pr_addr(&monc->con.peer_addr)); } else if (!was_auth && ceph_auth_is_authenticated(monc->auth)) { dout("authenticated, starting session\n"); -- 2.21.0