From: Guoqing Jiang <guoqing.jiang@linux.dev>
To: haris.iqbal@ionos.com, jinpu.wang@ionos.com, axboe@kernel.dk
Cc: linux-block@vger.kernel.org
Subject: [PATCH V2 1/3] rnbd-srv: add comment in rnbd_srv_rdma_ev
Date: Fri, 2 Sep 2022 18:00:53 +0800 [thread overview]
Message-ID: <20220902100055.25724-2-guoqing.jiang@linux.dev> (raw)
In-Reply-To: <20220902100055.25724-1-guoqing.jiang@linux.dev>
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(+)
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
next prev parent reply other threads:[~2022-09-02 10:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-02 10:00 [PATCH V2 0/3] Small changes for rnbd-srv Guoqing Jiang
2022-09-02 10:00 ` Guoqing Jiang [this message]
2022-09-05 11:41 ` [PATCH V2 1/3] rnbd-srv: add comment in rnbd_srv_rdma_ev Haris Iqbal
2022-09-02 10:00 ` [PATCH V2 2/3] rnbd-srv: make process_msg_close returns void Guoqing Jiang
2022-09-02 10:00 ` [PATCH V2 3/3] rnbd-srv: remove redundant setting of blk_open_flags Guoqing Jiang
2022-09-05 17:46 ` [PATCH V2 0/3] Small changes for rnbd-srv Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220902100055.25724-2-guoqing.jiang@linux.dev \
--to=guoqing.jiang@linux.dev \
--cc=axboe@kernel.dk \
--cc=haris.iqbal@ionos.com \
--cc=jinpu.wang@ionos.com \
--cc=linux-block@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).