summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2012-07-30 18:16:40 -0700
committerSage Weil <sage@inktank.com>2012-07-30 18:16:40 -0700
commit4f471e4a9c7db0256834e1b376ea50c82e345c3c (patch)
tree9533ad03db8fcbeb38c08e9b43f38b0687e26792 /net
parent8007b8d626b49c34fb146ec16dc639d8b10c862f (diff)
downloadlinux-4f471e4a9c7db0256834e1b376ea50c82e345c3c.tar.gz
linux-4f471e4a9c7db0256834e1b376ea50c82e345c3c.tar.bz2
linux-4f471e4a9c7db0256834e1b376ea50c82e345c3c.zip
libceph: revoke mon_client messages on session restart
Revoke all mon_client messages when we shut down the old connection. This is mostly moot since we are re-using the same ceph_connection, but it is cleaner. Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Alex Elder <elder@inktank.com>
Diffstat (limited to 'net')
-rw-r--r--net/ceph/mon_client.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/ceph/mon_client.c b/net/ceph/mon_client.c
index bfd21a891d69..105d533b55f3 100644
--- a/net/ceph/mon_client.c
+++ b/net/ceph/mon_client.c
@@ -118,6 +118,9 @@ static void __close_session(struct ceph_mon_client *monc)
{
dout("__close_session closing mon%d\n", monc->cur_mon);
ceph_msg_revoke(monc->m_auth);
+ ceph_msg_revoke_incoming(monc->m_auth_reply);
+ ceph_msg_revoke(monc->m_subscribe);
+ ceph_msg_revoke_incoming(monc->m_subscribe_ack);
ceph_con_close(&monc->con);
monc->cur_mon = -1;
monc->pending_auth = 0;
@@ -685,6 +688,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_msg_revoke(req->request);
+ ceph_msg_revoke_incoming(req->reply);
ceph_con_send(&monc->con, ceph_msg_get(req->request));
}
}