diff mbox series

[V2,1/3] rnbd-srv: add comment in rnbd_srv_rdma_ev

Message ID 20220902100055.25724-2-guoqing.jiang@linux.dev (mailing list archive)
State New, archived
Headers show
Series Small changes for rnbd-srv | expand

Commit Message

Guoqing Jiang Sept. 2, 2022, 10 a.m. UTC
Let's add some explanations here given the err handling is not obvious.

Signed-off-by: Guoqing Jiang <guoqing.jiang@linux.dev>
---
 drivers/block/rnbd/rnbd-srv.c | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Haris Iqbal Sept. 5, 2022, 11:41 a.m. UTC | #1
On Fri, Sep 2, 2022 at 12:01 PM Guoqing Jiang <guoqing.jiang@linux.dev> wrote:
>
> Let's add some explanations here given the err handling is not obvious.
>
> Signed-off-by: Guoqing Jiang <guoqing.jiang@linux.dev>
> ---

Acked-by: Md Haris Iqbal <haris.iqbal@ionos.com>

Thanks.

>  drivers/block/rnbd/rnbd-srv.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/drivers/block/rnbd/rnbd-srv.c b/drivers/block/rnbd/rnbd-srv.c
> index 3f6c268e04ef..a229dd87c322 100644
> --- a/drivers/block/rnbd/rnbd-srv.c
> +++ b/drivers/block/rnbd/rnbd-srv.c
> @@ -402,6 +402,11 @@ static int rnbd_srv_rdma_ev(void *priv,
>                 return -EINVAL;
>         }
>
> +       /*
> +        * Since ret is passed to rtrs to handle the failure case, we
> +        * just return 0 at the end otherwise callers in rtrs would call
> +        * send_io_resp_imm again to print redundant err message.
> +        */
>         rtrs_srv_resp_rdma(id, ret);
>         return 0;
>  }
> --
> 2.31.1
>
diff mbox series

Patch

diff --git a/drivers/block/rnbd/rnbd-srv.c b/drivers/block/rnbd/rnbd-srv.c
index 3f6c268e04ef..a229dd87c322 100644
--- a/drivers/block/rnbd/rnbd-srv.c
+++ b/drivers/block/rnbd/rnbd-srv.c
@@ -402,6 +402,11 @@  static int rnbd_srv_rdma_ev(void *priv,
 		return -EINVAL;
 	}
 
+	/*
+	 * Since ret is passed to rtrs to handle the failure case, we
+	 * just return 0 at the end otherwise callers in rtrs would call
+	 * send_io_resp_imm again to print redundant err message.
+	 */
 	rtrs_srv_resp_rdma(id, ret);
 	return 0;
 }