From: Ming Lei <ming.lei@redhat.com>
To: ZiyangZhang <ZiyangZhang@linux.alibaba.com>
Cc: axboe@kernel.dk, linux-block@vger.kernel.org,
xiaoguang.wang@linux.alibaba.com, joseph.qi@linux.alibaba.com
Subject: Re: [PATCH V2 2/3] ublk_drv: update comment for __ublk_fail_req()
Date: Tue, 16 Aug 2022 11:01:14 +0800 [thread overview]
Message-ID: <YvsIeo/Cb9R6xItd@T590> (raw)
In-Reply-To: <20220815023633.259825-3-ZiyangZhang@linux.alibaba.com>
On Mon, Aug 15, 2022 at 10:36:32AM +0800, ZiyangZhang wrote:
> Since __ublk_rq_task_work always fails requests immediately during
> exiting, __ublk_fail_req() is only called from abort context during
> exiting. So lock is unnecessary.
>
> Signed-off-by: ZiyangZhang <ZiyangZhang@linux.alibaba.com>
> ---
> drivers/block/ublk_drv.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/block/ublk_drv.c b/drivers/block/ublk_drv.c
> index 17896172b0fe..685a43b7ae6e 100644
> --- a/drivers/block/ublk_drv.c
> +++ b/drivers/block/ublk_drv.c
> @@ -605,8 +605,9 @@ static void ublk_complete_rq(struct request *req)
> }
>
> /*
> - * __ublk_fail_req() may be called from abort context or ->ubq_daemon
> - * context during exiting, so lock is required.
> + * Since __ublk_rq_task_work always fails requests immediately during
> + * exiting, __ublk_fail_req() is only called from abort context during
> + * exiting. So lock is unnecessary.
> *
> * Also aborting may not be started yet, keep in mind that one failed
> * request may be issued by block layer again.
> --
> 2.27.0
>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
--
Ming
next prev parent reply other threads:[~2022-08-16 6:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-15 2:36 [PATCH V2 0/3] ublk_drv: cleanup and bugfix ZiyangZhang
2022-08-15 2:36 ` [PATCH V2 1/3] ublk_drv: check ubq_daemon_is_dying() in __ublk_rq_task_work() ZiyangZhang
2022-08-15 2:36 ` [PATCH V2 2/3] ublk_drv: update comment for __ublk_fail_req() ZiyangZhang
2022-08-16 3:01 ` Ming Lei [this message]
2022-08-15 2:36 ` [PATCH V2 3/3] ublk_drv: do not add a re-issued request aborted previously to ioucmd's task_work ZiyangZhang
2022-08-16 3:02 ` Ming Lei
2022-08-16 12:16 ` [PATCH V2 0/3] ublk_drv: cleanup and bugfix 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=YvsIeo/Cb9R6xItd@T590 \
--to=ming.lei@redhat.com \
--cc=ZiyangZhang@linux.alibaba.com \
--cc=axboe@kernel.dk \
--cc=joseph.qi@linux.alibaba.com \
--cc=linux-block@vger.kernel.org \
--cc=xiaoguang.wang@linux.alibaba.com \
/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