aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ceph/super.c')
-rw-r--r--fs/ceph/super.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/fs/ceph/super.c b/fs/ceph/super.c
index 93ad169a6ae1..a8124e89dea1 100644
--- a/fs/ceph/super.c
+++ b/fs/ceph/super.c
@@ -682,9 +682,10 @@ int ceph_check_fsid(struct ceph_client *client, struct ceph_fsid *fsid)
682/* 682/*
683 * true if we have the mon map (and have thus joined the cluster) 683 * true if we have the mon map (and have thus joined the cluster)
684 */ 684 */
685static int have_mon_map(struct ceph_client *client) 685static int have_mon_and_osd_map(struct ceph_client *client)
686{ 686{
687 return client->monc.monmap && client->monc.monmap->epoch; 687 return client->monc.monmap && client->monc.monmap->epoch &&
688 client->osdc.osdmap && client->osdc.osdmap->epoch;
688} 689}
689 690
690/* 691/*
@@ -762,7 +763,7 @@ static int ceph_mount(struct ceph_client *client, struct vfsmount *mnt,
762 if (err < 0) 763 if (err < 0)
763 goto out; 764 goto out;
764 765
765 while (!have_mon_map(client)) { 766 while (!have_mon_and_osd_map(client)) {
766 err = -EIO; 767 err = -EIO;
767 if (timeout && time_after_eq(jiffies, started + timeout)) 768 if (timeout && time_after_eq(jiffies, started + timeout))
768 goto out; 769 goto out;
@@ -770,8 +771,8 @@ static int ceph_mount(struct ceph_client *client, struct vfsmount *mnt,
770 /* wait */ 771 /* wait */
771 dout("mount waiting for mon_map\n"); 772 dout("mount waiting for mon_map\n");
772 err = wait_event_interruptible_timeout(client->auth_wq, 773 err = wait_event_interruptible_timeout(client->auth_wq,
773 have_mon_map(client) || (client->auth_err < 0), 774 have_mon_and_osd_map(client) || (client->auth_err < 0),
774 timeout); 775 timeout);
775 if (err == -EINTR || err == -ERESTARTSYS) 776 if (err == -EINTR || err == -ERESTARTSYS)
776 goto out; 777 goto out;
777 if (client->auth_err < 0) { 778 if (client->auth_err < 0) {