Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 198055
b: refs/heads/master
c: 6822d00
h: refs/heads/master
i:
  198053: c2458d8
  198051: e9e3830
  198047: 85dfe32
v: v3
  • Loading branch information
Sage Weil committed May 17, 2010
1 parent 6b818ab commit 62b4f06
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6f2bc3ff4cdb03903c79e155e9e1889ce176de09
refs/heads/master: 6822d00b5462e7a9dfa11dcc60cc25823a2107c5
11 changes: 6 additions & 5 deletions trunk/fs/ceph/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -682,9 +682,10 @@ int ceph_check_fsid(struct ceph_client *client, struct ceph_fsid *fsid)
/*
* true if we have the mon map (and have thus joined the cluster)
*/
static int have_mon_map(struct ceph_client *client)
static int have_mon_and_osd_map(struct ceph_client *client)
{
return client->monc.monmap && client->monc.monmap->epoch;
return client->monc.monmap && client->monc.monmap->epoch &&
client->osdc.osdmap && client->osdc.osdmap->epoch;
}

/*
Expand Down Expand Up @@ -762,16 +763,16 @@ static int ceph_mount(struct ceph_client *client, struct vfsmount *mnt,
if (err < 0)
goto out;

while (!have_mon_map(client)) {
while (!have_mon_and_osd_map(client)) {
err = -EIO;
if (timeout && time_after_eq(jiffies, started + timeout))
goto out;

/* wait */
dout("mount waiting for mon_map\n");
err = wait_event_interruptible_timeout(client->auth_wq,
have_mon_map(client) || (client->auth_err < 0),
timeout);
have_mon_and_osd_map(client) || (client->auth_err < 0),
timeout);
if (err == -EINTR || err == -ERESTARTSYS)
goto out;
if (client->auth_err < 0) {
Expand Down

0 comments on commit 62b4f06

Please sign in to comment.