summaryrefslogtreecommitdiff
path: root/drivers/block/drbd
diff options
context:
space:
mode:
authorLars Ellenberg <lars.ellenberg@linbit.com>2012-11-05 14:54:30 +0400
committerPhilipp Reisner <philipp.reisner@linbit.com>2012-11-09 17:22:19 +0400
commited635cb0674d6e4303d1a2e27d9e6e80b451a338 (patch)
treef540786331a69a1d6d378a2a64a0a79cd2bcdfff /drivers/block/drbd
parent063eacf88cc1394ece125d106c05cba1ca03aa3d (diff)
downloadlinux-ed635cb0674d6e4303d1a2e27d9e6e80b451a338.tar.xz
drbd: if the replication link breaks during handshake, keep retrying
The 8.3.12 commit drbd: Bugfix for the connection behavior fixes a "wasted established connection", if a former connection attempt failed during its early stages. However it opened a window for a regression, if a connection attempt fails during its last stages. The result was a terminated receiver thread, that left behind the supposedly transient "C_UNCONNECTED" state. Any later requests to change the connection state fail, as they wait for the connection state to "stabilize". Fix: short circuit and keep retrying to restablish a new connection, if we don't reach C_WF_REPORT_PARAMS. Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block/drbd')
-rw-r--r--drivers/block/drbd/drbd_receiver.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c
index 9a9d4fd264a9..1599a1a6f1f7 100644
--- a/drivers/block/drbd/drbd_receiver.c
+++ b/drivers/block/drbd/drbd_receiver.c
@@ -1051,7 +1051,7 @@ randomize:
rcu_read_unlock();
rv = conn_request_state(tconn, NS(conn, C_WF_REPORT_PARAMS), CS_VERBOSE);
- if (rv < SS_SUCCESS) {
+ if (rv < SS_SUCCESS || tconn->cstate != C_WF_REPORT_PARAMS) {
clear_bit(STATE_SENT, &tconn->flags);
return 0;
}