From: Christoph Hellwig <hch@lst.de>
To: Jens Axboe <axboe@kernel.dk>
Cc: Christoph Hellwig <hch@lst.de>, Jonathan Corbet <corbet@lwn.net>,
Damien Le Moal <dlemoal@kernel.org>,
Hannes Reinecke <hare@suse.de>, Keith Busch <kbusch@kernel.org>,
linux-block@vger.kernel.org, linux-doc@vger.kernel.org,
Hannes Reinecke <hare@kernel.org>
Subject: Re: [PATCH 4/4] block: add configurable error injection
Date: Tue, 9 Jun 2026 09:41:22 +0200 [thread overview]
Message-ID: <20260609074122.GB6877@lst.de> (raw)
In-Reply-To: <bac50400-dd86-4c7f-bab3-481c1306877b@kernel.dk>
On Mon, Jun 08, 2026 at 08:53:22AM -0600, Jens Axboe wrote:
> > + if (!test_bit(GD_ERROR_INJECT, &bio->bi_bdev->bd_disk->state))
> > + return false;
> > + return __blk_error_inject(bio);
> > +}
>
> I really hate this part, that's a pretty deep set of pointer chasings to
> figure out if injection is enabled or not,
It's to the bdev we use everywhere, and then to the disk which we use
in a lot of places in the submission path.
The only easy way to reduce it would be to move the state to the
block_device. We currently don't do partitions in debugfs, but maybe
we should?
> when in practice error
> injection is only ever enabled for specific test cases and distros
> invariably will set CONFIG_BLK_ERROR_INJECTION because they turn on
> every damn thing under the sun.
>
> IOW, that won't fly for the hot path. Maybe a static key would be useful
> here?
a static_key makes sense here, probably including the legacy error
injection.
next prev parent reply other threads:[~2026-06-09 7:41 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-08 5:14 configurable block error injection v3 Christoph Hellwig
2026-06-08 5:14 ` [PATCH 1/4] block: add a macro to initialize the status table Christoph Hellwig
2026-06-08 21:51 ` Bart Van Assche
2026-06-08 5:14 ` [PATCH 2/4] block: add a "tag" for block status codes Christoph Hellwig
2026-06-08 21:55 ` Bart Van Assche
2026-06-09 7:43 ` Christoph Hellwig
2026-06-08 5:14 ` [PATCH 3/4] block: add a str_to_blk_op helper Christoph Hellwig
2026-06-08 21:57 ` Bart Van Assche
2026-06-09 7:45 ` Christoph Hellwig
2026-06-08 5:14 ` [PATCH 4/4] block: add configurable error injection Christoph Hellwig
2026-06-08 14:53 ` Jens Axboe
2026-06-09 7:41 ` Christoph Hellwig [this message]
2026-06-08 22:08 ` Bart Van Assche
2026-06-09 7:47 ` Christoph Hellwig
-- strict thread matches above, loose matches on Subject: below --
2026-06-05 18:44 configurable block error injection v2 Christoph Hellwig
2026-06-05 18:44 ` [PATCH 4/4] block: add configurable error injection Christoph Hellwig
2026-06-06 7:28 ` Hannes Reinecke
2026-06-06 7:33 ` Damien Le Moal
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=20260609074122.GB6877@lst.de \
--to=hch@lst.de \
--cc=axboe@kernel.dk \
--cc=corbet@lwn.net \
--cc=dlemoal@kernel.org \
--cc=hare@kernel.org \
--cc=hare@suse.de \
--cc=kbusch@kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-doc@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