diff options
author | Sage Weil <sage@newdream.net> | 2010-05-25 15:38:06 -0700 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2010-05-29 09:12:38 -0700 |
commit | 09c4d6a7d40dd26c1b35674c582382b7ea551368 (patch) | |
tree | b3afda46b0342ea3e87980b5bb2f6148ce119414 | |
parent | 984c76908efd3c6795aa03dff16a8fc3496af99f (diff) | |
download | kernel_samsung_tuna-09c4d6a7d40dd26c1b35674c582382b7ea551368.zip kernel_samsung_tuna-09c4d6a7d40dd26c1b35674c582382b7ea551368.tar.gz kernel_samsung_tuna-09c4d6a7d40dd26c1b35674c582382b7ea551368.tar.bz2 |
ceph: do not resend mon requests on auth ticket renewal
We only want to send pending mon requests when we successfully
authenticate. If we are already authenticated, like when we renew our
ticket, there is no need to resend pending requests.
Signed-off-by: Sage Weil <sage@newdream.net>
-rw-r--r-- | fs/ceph/mon_client.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/ceph/mon_client.c b/fs/ceph/mon_client.c index f6510a4..21c62e9 100644 --- a/fs/ceph/mon_client.c +++ b/fs/ceph/mon_client.c @@ -704,8 +704,11 @@ static void handle_auth_reply(struct ceph_mon_client *monc, struct ceph_msg *msg) { int ret; + int was_auth = 0; mutex_lock(&monc->mutex); + if (monc->auth->ops) + was_auth = monc->auth->ops->is_authenticated(monc->auth); monc->pending_auth = 0; ret = ceph_handle_auth_reply(monc->auth, msg->front.iov_base, msg->front.iov_len, @@ -716,7 +719,7 @@ static void handle_auth_reply(struct ceph_mon_client *monc, wake_up(&monc->client->auth_wq); } else if (ret > 0) { __send_prepared_auth_request(monc, ret); - } else if (monc->auth->ops->is_authenticated(monc->auth)) { + } else if (!was_auth && monc->auth->ops->is_authenticated(monc->auth)) { dout("authenticated, starting session\n"); monc->client->msgr->inst.name.type = CEPH_ENTITY_TYPE_CLIENT; |