提交 ed635cb0 编写于 作者: L Lars Ellenberg 提交者: Philipp Reisner

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: NPhilipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: NLars Ellenberg <lars.ellenberg@linbit.com>
上级 063eacf8
......@@ -1051,7 +1051,7 @@ static int conn_connect(struct drbd_tconn *tconn)
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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册