diff options
author | Sage Weil <sage@newdream.net> | 2010-05-21 12:31:49 -0700 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2010-05-21 15:01:22 -0700 |
commit | 970690012c572fc3b7be532080564b730f6a9c02 (patch) | |
tree | 07fcab8e6e374e175aa964a33b5d8a2c36dc76a8 /fs/ceph/mon_client.c | |
parent | 9e32789f63fc5ad91c8b10f68ec23a86856d5af5 (diff) |
ceph: avoid resending queued message to monitor
The auth_reply handler will (re)send any pending requests. For the
initial mon authenticate phase, that's correct, but when a auth ticket
renewal races with an in-flight request, we may resend a request message
that is already in flight. Avoid this by revoking the message before
sending it.
We should also avoid resending requests at all during ticket renewal; that
will come soon.
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/mon_client.c')
-rw-r--r-- | fs/ceph/mon_client.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ceph/mon_client.c b/fs/ceph/mon_client.c index 478729a6ffce..12d94f24ee97 100644 --- a/fs/ceph/mon_client.c +++ b/fs/ceph/mon_client.c @@ -104,6 +104,7 @@ static void __send_prepared_auth_request(struct ceph_mon_client *monc, int len) monc->pending_auth = 1; monc->m_auth->front.iov_len = len; monc->m_auth->hdr.front_len = cpu_to_le32(len); + ceph_con_revoke(monc->con, monc->m_auth); ceph_msg_get(monc->m_auth); /* keep our ref */ ceph_con_send(monc->con, monc->m_auth); } @@ -539,6 +540,7 @@ static void __resend_generic_request(struct ceph_mon_client *monc) for (p = rb_first(&monc->generic_request_tree); p; p = rb_next(p)) { req = rb_entry(p, struct ceph_mon_generic_request, node); + ceph_con_revoke(monc->con, req->request); ceph_con_send(monc->con, ceph_msg_get(req->request)); } } |