Skip to content

Commit

Permalink
ceph: fix availability check of mds cluster
Browse files Browse the repository at this point in the history
we should apply the check after getting the initial mdsmap

Fixes: http://tracker.ceph.com/issues/18161
Signed-off-by: Yan, Zheng <zyan@redhat.com>
  • Loading branch information
ukernel committed Jan 4, 2017
1 parent 297eca1 commit 9c0e972
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions fs/ceph/mds_client.c
Expand Up @@ -2136,6 +2136,11 @@ static int __do_request(struct ceph_mds_client *mdsc,
dout("do_request mdsmap err %d\n", err);
goto finish;
}
if (mdsc->mdsmap->m_epoch == 0) {
dout("do_request no mdsmap, waiting for map\n");
list_add(&req->r_wait, &mdsc->waiting_for_map);
goto finish;
}
if (!(mdsc->fsc->mount_options->flags &
CEPH_MOUNT_OPT_MOUNTWAIT) &&
!ceph_mdsmap_is_cluster_available(mdsc->mdsmap)) {
Expand Down

0 comments on commit 9c0e972

Please sign in to comment.