Skip to content

Commit

Permalink
ceph: mount fails immediately on error
Browse files Browse the repository at this point in the history
Signed-off-by: Yehuda Sadeh <yehuda@newdream.net>
  • Loading branch information
Yehuda Sadeh authored and Sage Weil committed Nov 20, 2009
1 parent 94045e1 commit dc14657
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions fs/ceph/auth.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,11 @@ int ceph_handle_auth_reply(struct ceph_auth_client *ac,
}

if (ac->negotiating) {
/* server does not support our protocols? */
if (!protocol && result < 0) {
ret = result;
goto out;
}
/* set up (new) protocol handler? */
if (ac->protocol && ac->protocol != protocol) {
ac->ops->destroy(ac);
Expand Down
6 changes: 5 additions & 1 deletion fs/ceph/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -712,10 +712,14 @@ static int ceph_mount(struct ceph_client *client, struct vfsmount *mnt,
/* wait */
dout("mount waiting for mon_map\n");
err = wait_event_interruptible_timeout(client->mount_wq, /* FIXME */
have_mon_map(client),
have_mon_map(client) || (client->mount_err < 0),
timeout);
if (err == -EINTR || err == -ERESTARTSYS)
goto out;
if (client->mount_err < 0) {
err = client->mount_err;
goto out;
}
}

dout("mount opening root\n");
Expand Down

0 comments on commit dc14657

Please sign in to comment.