[PATCH] rdma: Add network ping detection

zhengbing.huang zhengbing.huang at easystack.cn
Tue Mar 11 12:06:32 CET 2025


In rdma mode, the drbd establishes a connection between two nodes,
and without I/O. If one node suddenly crash,
the connection status of the remain node is still normal.
That is, the remain node cannot detect the exception of the peer node.

So in rdma transport mode, we also add a ping work, like tcp transport mode.

Signed-off-by: zhengbing.huang <zhengbing.huang at easystack.cn>
---
 drbd/drbd_transport_rdma.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drbd/drbd_transport_rdma.c b/drbd/drbd_transport_rdma.c
index 427065789..9799be396 100644
--- a/drbd/drbd_transport_rdma.c
+++ b/drbd/drbd_transport_rdma.c
@@ -3152,6 +3152,9 @@ static void dtr_set_rcvtimeo(struct drbd_transport *transport, enum drbd_stream
 		container_of(transport, struct dtr_transport, transport);
 
 	rdma_transport->stream[stream].recv_timeout = timeout;
+
+	if (stream == CONTROL_STREAM)
+		mod_timer(&rdma_transport->control_timer, jiffies + timeout);
 }
 
 static long dtr_get_rcvtimeo(struct drbd_transport *transport, enum drbd_stream stream)
-- 
2.43.0



More information about the drbd-dev mailing list