提交 c12a3d8c 编写于 作者: P Philipp Reisner 提交者: Jens Axboe

drbd: Fix a potential issue with the DISCARD_CONCURRENT flag

The DISCARD_CONCURRENT flag should be set on one node and cleared on the
other node.
As the code was before it was theoretical possible that a node accepts the
meta socket, but has to close it later on, and keeps the DISCARD_CONCURRENT
flag.
Correct this by moving the clear_bit(DISCARD_CONCURRENT) where the packet
gets sent.
Signed-off-by: NPhilipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: NLars Ellenberg <lars.ellenberg@linbit.com>
Signed-off-by: NJens Axboe <axboe@kernel.dk>
上级 02b91b55
......@@ -763,8 +763,6 @@ static int drbd_connect(struct drbd_conf *mdev)
if (drbd_request_state(mdev, NS(conn, C_WF_CONNECTION)) < SS_SUCCESS)
return -2;
clear_bit(DISCARD_CONCURRENT, &mdev->flags);
sock = NULL;
msock = NULL;
......@@ -784,6 +782,7 @@ static int drbd_connect(struct drbd_conf *mdev)
sock = s;
s = NULL;
} else if (!msock) {
clear_bit(DISCARD_CONCURRENT, &mdev->flags);
drbd_send_fp(mdev, s, P_HAND_SHAKE_M);
msock = s;
s = NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册