[PATCH v3] ceph: show more detail logs during mount

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Xiubo Li <xiubli@xxxxxxxxxx>

Print the logs in error level to give a helpful hint to make it
more user-friendly to do debug.

URL: https://tracker.ceph.com/issues/44215
Signed-off-by: Xiubo Li <xiubli@xxxxxxxxxx>
---
 fs/ceph/super.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/fs/ceph/super.c b/fs/ceph/super.c
index c7f150686a53..0768e1bbd22e 100644
--- a/fs/ceph/super.c
+++ b/fs/ceph/super.c
@@ -905,8 +905,11 @@ 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) {
+			errorfc(fc, "mount joining the ceph cluster fail %d",
+				err);
 			goto out;
+		}
 
 		/* setup fscache */
 		if (fsc->mount_options->flags & CEPH_MOUNT_OPT_FSCACHE) {
@@ -922,6 +925,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);
+			errorfc(fc, "mount opening the root directory fail %d",
+				err);
 			goto out;
 		}
 		fsc->sb->s_root = dget(root);
@@ -1079,7 +1084,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");
+		errorfc(fc, "No mds server is up or the cluster is laggy");
 		err = -EHOSTUNREACH;
 	}
 
-- 
2.21.0




[Index of Archives]     [CEPH Users]     [Ceph Large]     [Ceph Dev]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux