diff options
author | Xiubo Li <xiubli@redhat.com> | 2019-12-11 02:29:40 +0100 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2020-01-27 16:53:39 +0100 |
commit | 97820058fb2831a4b203981fa2566ceaaa396103 (patch) | |
tree | 5a18ce172f2de81f74d5cbdabae3df5ccbdc0be6 /fs/ceph/super.c | |
parent | ceph: keep the session state until it is released (diff) | |
download | linux-97820058fb2831a4b203981fa2566ceaaa396103.tar.xz linux-97820058fb2831a4b203981fa2566ceaaa396103.zip |
ceph: check availability of mds cluster on mount after wait timeout
If all the MDS daemons are down for some reason, then the first mount
attempt will fail with EIO after the mount request times out. A mount
attempt will also fail with EIO if all of the MDS's are laggy.
This patch changes the code to return -EHOSTUNREACH in these situations
and adds a pr_info error message to help the admin determine the cause.
URL: https://tracker.ceph.com/issues/4386
Signed-off-by: Xiubo Li <xiubli@redhat.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph/super.c')
-rw-r--r-- | fs/ceph/super.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/ceph/super.c b/fs/ceph/super.c index 29a795f975df..430dcf329723 100644 --- a/fs/ceph/super.c +++ b/fs/ceph/super.c @@ -1070,6 +1070,11 @@ static int ceph_get_tree(struct fs_context *fc) return 0; out_splat: + if (!ceph_mdsmap_is_cluster_available(fsc->mdsc->mdsmap)) { + pr_info("No mds server is up or the cluster is laggy\n"); + err = -EHOSTUNREACH; + } + ceph_mdsc_close_sessions(fsc->mdsc); deactivate_locked_super(sb); goto out_final; |