Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 346158
b: refs/heads/master
c: 4d0fc3f
h: refs/heads/master
v: v3
  • Loading branch information
Philipp Reisner committed Nov 8, 2012
1 parent 3164454 commit 684f71c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1a3cde440615b0be304b3f92486c5c69ede4666b
refs/heads/master: 4d0fc3fdc3144b974888bb06efad69a0eb85719a
1 change: 1 addition & 0 deletions trunk/drivers/block/drbd/drbd_int.h
Original file line number Diff line number Diff line change
Expand Up @@ -811,6 +811,7 @@ enum {
SEND_PING, /* whether asender should send a ping asap */
SIGNAL_ASENDER, /* whether asender wants to be interrupted */
GOT_PING_ACK, /* set when we receive a ping_ack packet, ping_wait gets woken */
CONN_WD_ST_CHG_REQ, /* A cluster wide state change on the connection is active */
CONN_WD_ST_CHG_OKAY,
CONN_WD_ST_CHG_FAIL,
CONN_DRY_RUN, /* Expect disconnect after resync handshake. */
Expand Down
5 changes: 5 additions & 0 deletions trunk/drivers/block/drbd/drbd_receiver.c
Original file line number Diff line number Diff line change
Expand Up @@ -4827,6 +4827,11 @@ static int got_RqSReply(struct drbd_tconn *tconn, struct packet_info *pi)
if (!mdev)
return -EIO;

if (test_bit(CONN_WD_ST_CHG_REQ, &tconn->flags)) {
D_ASSERT(tconn->agreed_pro_version < 100);
return got_conn_RqSReply(tconn, pi);
}

if (retcode >= SS_SUCCESS) {
set_bit(CL_ST_CHG_SUCCESS, &mdev->flags);
} else {
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/block/drbd/drbd_state.c
Original file line number Diff line number Diff line change
Expand Up @@ -1671,14 +1671,17 @@ conn_cl_wide(struct drbd_tconn *tconn, union drbd_state mask, union drbd_state v
spin_unlock_irq(&tconn->req_lock);
mutex_lock(&tconn->cstate_mutex);

set_bit(CONN_WD_ST_CHG_REQ, &tconn->flags);
if (conn_send_state_req(tconn, mask, val)) {
clear_bit(CONN_WD_ST_CHG_REQ, &tconn->flags);
rv = SS_CW_FAILED_BY_PEER;
/* if (f & CS_VERBOSE)
print_st_err(mdev, os, ns, rv); */
goto abort;
}

wait_event(tconn->ping_wait, (rv = _conn_rq_cond(tconn, mask, val)));
clear_bit(CONN_WD_ST_CHG_REQ, &tconn->flags);

abort:
mutex_unlock(&tconn->cstate_mutex);
Expand Down

0 comments on commit 684f71c

Please sign in to comment.