From: Christoph Hellwig <hch@lst.de>
To: Haris Iqbal <haris.iqbal@linux.dev>
Cc: Christoph Hellwig <hch@lst.de>, Jens Axboe <axboe@kernel.dk>,
linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
Keith Busch <kbusch@kernel.org>, Jonathan Corbet <corbet@lwn.net>,
linux-doc@vger.kernel.org
Subject: Re: [v4 0/3] block: delay support for error injection
Date: Wed, 2 Dec 2026 09:02:21 +0100 [thread overview]
Message-ID: <20261202080221.GA4326@lst.de> (raw)
In-Reply-To: <f2effaaa-0cfa-43a8-a5ce-015ba36ca80b@linux.dev>
On Tue, Dec 01, 2026 at 10:34:16PM +0100, Haris Iqbal wrote:
> I was looking into the report and the scenarios, and I think part of this
> is real, but I'm not sure the rest can happen.
>
> The delayed bio is resubmitted through submit_bio_noacct_nocheck(), which
> skips bio_check_eod(). If the disk is removed while the bio waits, I think
> the bio can still reach the driver on sd/sr, because their queue is
> unfrozen again after del_gendisk(). So this part makes sense and I think
> failing the bio in the work when GD_DEAD should fix it.
Yes.
>
> I don't think the use-after-free through nvme multipath can happen. Path
> disks are hidden, so their bdev is never added and disk_live() is false,
> and error_inject_add() returns -ENODEV for a disk that isn't live. I tried
> it with nvme-loop: writing a rule to the path disk's eror_injection file
> fails with ENODEV. If that's right, a bio is never delayed on a path disk,
> only on the head disk.
Ok.
> So I'm thinking of adding just the GD_DEAD check. One thing I'd like an
> opinion on: a delayed bio holds no q_usage_counter, so del_gendisk()
> doesn't wait for it, and only the issuer's open keeps the disk allocated.
> Is that fine to rely on, or should the delayed bio take its own reference
> on the bdev (and the driver module) for the duration of the delay?
I think clearing BIO_ERROR_INJECTED on remapping is also still needed.
prev parent reply other threads:[~2026-12-02 8:02 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-11 21:58 [v4 0/3] block: delay support for error injection Md Haris Iqbal
2026-11-11 21:58 ` [v4 1/3] block: Reject unknown status tags in error injection rules Md Haris Iqbal
2026-11-12 13:53 ` Christoph Hellwig
2026-11-11 21:58 ` [v4 2/3] block: allow error injection rules to delay bios Md Haris Iqbal
2026-11-12 13:54 ` Christoph Hellwig
2026-11-11 21:58 ` [v4 3/3] Documentation: block: document error injection delay feature Md Haris Iqbal
2026-11-12 13:54 ` Christoph Hellwig
2026-11-18 16:07 ` [v4 0/3] block: delay support for error injection Jens Axboe
2026-11-20 16:44 ` Christoph Hellwig
2026-11-21 11:27 ` Haris Iqbal
2026-11-26 1:49 ` Jens Axboe
2026-11-26 8:34 ` Christoph Hellwig
2026-11-26 15:29 ` Jens Axboe
2026-11-30 8:06 ` Christoph Hellwig
2026-12-01 21:34 ` Haris Iqbal
2026-12-02 8:02 ` Christoph Hellwig [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=20261202080221.GA4326@lst.de \
--to=hch@lst.de \
--cc=axboe@kernel.dk \
--cc=corbet@lwn.net \
--cc=haris.iqbal@linux.dev \
--cc=kbusch@kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.