Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 320273
b: refs/heads/master
c: 6740a84
h: refs/heads/master
i:
  320271: 8a19e76
v: v3
  • Loading branch information
Alex Elder authored and Alex Elder committed Jun 6, 2012
1 parent e1437e7 commit 64473ab
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 9 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: 92ce034b5a740046cc643a21ea21eaad589e0043
refs/heads/master: 6740a845b2543cc46e1902ba21bac743fbadd0dc
3 changes: 2 additions & 1 deletion trunk/include/linux/ceph/messenger.h
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,8 @@ extern void ceph_con_open(struct ceph_connection *con,
extern bool ceph_con_opened(struct ceph_connection *con);
extern void ceph_con_close(struct ceph_connection *con);
extern void ceph_con_send(struct ceph_connection *con, struct ceph_msg *msg);
extern void ceph_con_revoke(struct ceph_connection *con, struct ceph_msg *msg);

extern void ceph_msg_revoke(struct ceph_msg *msg);
extern void ceph_con_revoke_message(struct ceph_connection *con,
struct ceph_msg *msg);
extern void ceph_con_keepalive(struct ceph_connection *con);
Expand Down
7 changes: 6 additions & 1 deletion trunk/net/ceph/messenger.c
Original file line number Diff line number Diff line change
Expand Up @@ -2421,8 +2421,13 @@ EXPORT_SYMBOL(ceph_con_send);
/*
* Revoke a message that was previously queued for send
*/
void ceph_con_revoke(struct ceph_connection *con, struct ceph_msg *msg)
void ceph_msg_revoke(struct ceph_msg *msg)
{
struct ceph_connection *con = msg->con;

if (!con)
return; /* Message not in our possession */

mutex_lock(&con->mutex);
if (!list_empty(&msg->list_head)) {
dout("%s %p msg %p - was on queue\n", __func__, con, msg);
Expand Down
8 changes: 4 additions & 4 deletions trunk/net/ceph/mon_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,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_revoke(monc->m_auth);
ceph_msg_get(monc->m_auth); /* keep our ref */
ceph_con_send(&monc->con, monc->m_auth);
}
Expand All @@ -117,7 +117,7 @@ static void __send_prepared_auth_request(struct ceph_mon_client *monc, int len)
static void __close_session(struct ceph_mon_client *monc)
{
dout("__close_session closing mon%d\n", monc->cur_mon);
ceph_con_revoke(&monc->con, monc->m_auth);
ceph_msg_revoke(monc->m_auth);
ceph_con_close(&monc->con);
monc->con.private = NULL;
monc->cur_mon = -1;
Expand Down Expand Up @@ -229,7 +229,7 @@ static void __send_subscribe(struct ceph_mon_client *monc)

msg->front.iov_len = p - msg->front.iov_base;
msg->hdr.front_len = cpu_to_le32(msg->front.iov_len);
ceph_con_revoke(&monc->con, msg);
ceph_msg_revoke(msg);
ceph_con_send(&monc->con, ceph_msg_get(msg));

monc->sub_sent = jiffies | 1; /* never 0 */
Expand Down Expand Up @@ -688,7 +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_con_revoke(&monc->con, req->request);
ceph_msg_revoke(req->request);
ceph_con_send(&monc->con, ceph_msg_get(req->request));
}
}
Expand Down
4 changes: 2 additions & 2 deletions trunk/net/ceph/osd_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,7 @@ static void __unregister_request(struct ceph_osd_client *osdc,

if (req->r_osd) {
/* make sure the original request isn't in flight. */
ceph_con_revoke(&req->r_osd->o_con, req->r_request);
ceph_msg_revoke(req->r_request);

list_del_init(&req->r_osd_item);
if (list_empty(&req->r_osd->o_requests) &&
Expand All @@ -879,7 +879,7 @@ static void __unregister_request(struct ceph_osd_client *osdc,
static void __cancel_request(struct ceph_osd_request *req)
{
if (req->r_sent && req->r_osd) {
ceph_con_revoke(&req->r_osd->o_con, req->r_request);
ceph_msg_revoke(req->r_request);
req->r_sent = 0;
}
}
Expand Down

0 comments on commit 64473ab

Please sign in to comment.