diff options
author | Xiubo Li <xiubli@redhat.com> | 2019-12-10 20:29:40 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-02-28 16:36:07 +0100 |
commit | b817cc9f7d50bacbb6bd9b0f764432bdac68327c (patch) | |
tree | 95a8aa83d014102018c17f434a852afe78713065 /fs/ceph/super.c | |
parent | e534bec3712fc768f133defd6303353087bf90c8 (diff) | |
download | linux-rt-b817cc9f7d50bacbb6bd9b0f764432bdac68327c.tar.gz |
ceph: check availability of mds cluster on mount after wait timeout
[ Upstream commit 97820058fb2831a4b203981fa2566ceaaa396103 ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
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 088c4488b449..6b10b20bfe32 100644 --- a/fs/ceph/super.c +++ b/fs/ceph/super.c @@ -1055,6 +1055,11 @@ static struct dentry *ceph_mount(struct file_system_type *fs_type, return res; 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; |