From: Bart Van Assche <bvanassche@acm.org>
To: John Garry <john.garry@linux.dev>,
axboe@kernel.dk, James.Bottomley@HansenPartnership.com,
mkp@kernel.org, hch@lst.de, tom.leiming@gmail.com
Cc: linux-block@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: Re: [PATCH] blk-mq: cleanup terminal request when it could not be queued
Date: Fri, 11 Sep 2026 08:55:12 -0700 [thread overview]
Message-ID: <eb86ffe1-db3d-4b52-b4a7-08c9524a0dae@acm.org> (raw)
In-Reply-To: <20260911075415.634921-1-john.garry@linux.dev>
On 9/11/26 12:54 AM, John Garry wrote:
> Sashiko points out that the SCSI midlayer error handling misses some
> cleanup for when a request could not be queued and won't be requeued [0].
> Specifically, clearing the SCSI cmd flags member is missing. Normally that
> would be cleared in the non-error path in scsi_end_request() (which also
> calls __blk_mq_end_request()).
>
> Callchain blk_mq_cleanup_rq() -> scsi_cleanup_rq() does all the necessary
> cleanup, so call that in blk_mq_dispatch_rq_list() for when there was an
> error in the dispatch and the rq will be ended.
>
> Note that dm-rq code calls blk_mq_cleanup_rq() for a cloned rq (or SCSI rq)
> for when the clone could not be queued and will be retried, but that path
> does not use the sched code (and blk_mq_dispatch_rq_list()).
>
> [0] https://lore.kernel.org/linux-scsi/20260729161243.C918D1F00A3A@smtp.kernel.org/
>
> Suggesested-by: Bart Van Assche <bvanassche@acm.org>
> Signed-off-by: John Garry <john.garry@linux.dev>
Does this patch need a Fixes: tag? Anyway:
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
prev parent reply other threads:[~2026-09-11 15:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-11 7:54 [PATCH] blk-mq: cleanup terminal request when it could not be queued John Garry
2026-09-11 15:55 ` Bart Van Assche [this message]
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=eb86ffe1-db3d-4b52-b4a7-08c9524a0dae@acm.org \
--to=bvanassche@acm.org \
--cc=James.Bottomley@HansenPartnership.com \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=john.garry@linux.dev \
--cc=linux-block@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mkp@kernel.org \
--cc=tom.leiming@gmail.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