提交 71b1c1eb 编写于 作者: A Andreas Gruenbacher 提交者: Philipp Reisner

drbd: Use ping-timeout when waiting for missing ack packets

When the node with the discard flag resolves write conflicts in
dual-primary mode, it may determine that its peer has sent ack packets
on the metadata socket which did not arrive, yet.  Wait for the next ack
with ping-timeout instead of a hard-coded 30 seconds.
Signed-off-by: NPhilipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: NLars Ellenberg <lars.ellenberg@linbit.com>
上级 8ccf218e
...@@ -1710,11 +1710,12 @@ static int drbd_wait_peer_seq(struct drbd_conf *mdev, const u32 packet_seq) ...@@ -1710,11 +1710,12 @@ static int drbd_wait_peer_seq(struct drbd_conf *mdev, const u32 packet_seq)
} }
p_seq = mdev->peer_seq; p_seq = mdev->peer_seq;
spin_unlock(&mdev->peer_seq_lock); spin_unlock(&mdev->peer_seq_lock);
timeout = schedule_timeout(30*HZ); timeout = mdev->tconn->net_conf->ping_timeo*HZ/10;
timeout = schedule_timeout(timeout);
spin_lock(&mdev->peer_seq_lock); spin_lock(&mdev->peer_seq_lock);
if (timeout == 0 && p_seq == mdev->peer_seq) { if (timeout == 0 && p_seq == mdev->peer_seq) {
ret = -ETIMEDOUT; ret = -ETIMEDOUT;
dev_err(DEV, "ASSERT FAILED waited 30 seconds for sequence update, forcing reconnect\n"); dev_err(DEV, "Timed out waiting for missing ack packets; disconnecting\n");
break; break;
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册