diff options
author | Philipp Reisner <philipp.reisner@linbit.com> | 2012-01-20 13:52:27 +0100 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2012-11-08 16:58:14 +0100 |
commit | 4d0fc3fdc3144b974888bb06efad69a0eb85719a (patch) | |
tree | e61262b8828ee4a6a7450908ab2470044ae5f9cf /drivers/block/drbd/drbd_state.c | |
parent | drbd: drbd_bm_ALe_set_all(): Remove unused function (diff) | |
download | linux-4d0fc3fdc3144b974888bb06efad69a0eb85719a.tar.xz linux-4d0fc3fdc3144b974888bb06efad69a0eb85719a.zip |
drbd: Fixed compat issue with disconnecting 8.4 from a primary 8.3
For compatibility reasons 8.4 has to send P_STATE_CHG_REQ (instead
of P_CONN_ST_CHG_REQ) when disconnecting.
In the receiving code path we missed to convert the old
answer (P_STATE_CHG_REPLY) back to 8.4 logic. Therefore
the CL_ST_CHG_SUCCESS or CL_ST_CHG_FAIL bit in the flags word
of mdev got set, while the state code was waiting for
the CONN_WD_ST_CHG_OKAY or CONN_WD_ST_CHG_FAIL bits in tconn.
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block/drbd/drbd_state.c')
-rw-r--r-- | drivers/block/drbd/drbd_state.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/block/drbd/drbd_state.c b/drivers/block/drbd/drbd_state.c index 70aa9603e368..05ed131a5a87 100644 --- a/drivers/block/drbd/drbd_state.c +++ b/drivers/block/drbd/drbd_state.c @@ -1671,7 +1671,9 @@ 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); */ @@ -1679,6 +1681,7 @@ conn_cl_wide(struct drbd_tconn *tconn, union drbd_state mask, union drbd_state v } 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); |