Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 320362
b: refs/heads/master
c: 0065093
h: refs/heads/master
v: v3
  • Loading branch information
Sage Weil committed Jul 31, 2012
1 parent 10bd191 commit 0251818
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 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: 3b5ede07b55b52c3be27749d183d87257d032065
refs/heads/master: 00650931e52e97fe64096bec167f5a6780dfd94a
7 changes: 4 additions & 3 deletions trunk/net/ceph/messenger.c
Original file line number Diff line number Diff line change
Expand Up @@ -2441,12 +2441,10 @@ static void clear_standby(struct ceph_connection *con)
{
/* come back from STANDBY? */
if (test_and_clear_bit(STANDBY, &con->state)) {
mutex_lock(&con->mutex);
dout("clear_standby %p and ++connect_seq\n", con);
con->connect_seq++;
WARN_ON(test_bit(WRITE_PENDING, &con->flags));
WARN_ON(test_bit(KEEPALIVE_PENDING, &con->flags));
mutex_unlock(&con->mutex);
}
}

Expand Down Expand Up @@ -2483,11 +2481,12 @@ void ceph_con_send(struct ceph_connection *con, struct ceph_msg *msg)
le32_to_cpu(msg->hdr.front_len),
le32_to_cpu(msg->hdr.middle_len),
le32_to_cpu(msg->hdr.data_len));

clear_standby(con);
mutex_unlock(&con->mutex);

/* if there wasn't anything waiting to send before, queue
* new work */
clear_standby(con);
if (test_and_set_bit(WRITE_PENDING, &con->flags) == 0)
queue_con(con);
}
Expand Down Expand Up @@ -2574,7 +2573,9 @@ void ceph_msg_revoke_incoming(struct ceph_msg *msg)
void ceph_con_keepalive(struct ceph_connection *con)
{
dout("con_keepalive %p\n", con);
mutex_lock(&con->mutex);
clear_standby(con);
mutex_unlock(&con->mutex);
if (test_and_set_bit(KEEPALIVE_PENDING, &con->flags) == 0 &&
test_and_set_bit(WRITE_PENDING, &con->flags) == 0)
queue_con(con);
Expand Down

0 comments on commit 0251818

Please sign in to comment.