[PATCH] rdma: Add network ping detection

Philipp Reisner philipp.reisner at linbit.com
Wed Mar 12 09:57:47 CET 2025


Applied as https://github.com/LINBIT/drbd/commit/78c472291ad471f77bdf8fcc3a056a5806a530d3

Thanks!

PS: One of us will also review your "[PATCH] drbd: Fix IO block after
network failure" soon.


On Tue, Mar 11, 2025 at 12:11 PM zhengbing.huang
<zhengbing.huang at easystack.cn> wrote:
>
> 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