From: Christoph Hellwig <hch@lst.de>
To: Daniel Gomez <da.gomez@kernel.org>
Cc: Christoph Hellwig <hch@lst.de>, Jens Axboe <axboe@kernel.dk>,
Jonathan Corbet <corbet@lwn.net>,
linux-block@vger.kernel.org, linux-doc@vger.kernel.org,
bpf@vger.kernel.org, linux-kselftest@vger.kernel.org,
Luis Chamberlain <mcgrof@kernel.org>,
Masami Hiramatsu <mhiramat@kernel.org>,
Brendan Gregg <brendan.d.gregg@gmail.com>,
GOST <gost.dev@samsung.com>
Subject: Re: configurable block error injection
Date: Tue, 2 Jun 2026 17:05:03 +0200 [thread overview]
Message-ID: <20260602150503.GA6887@lst.de> (raw)
In-Reply-To: <e4c653ec-dfb4-4dce-a565-2a43520fc44f@kernel.org>
On Tue, Jun 02, 2026 at 11:58:25AM +0200, Daniel Gomez wrote:
> I wonder if the block layer would be interested in moving block error
> injection off the should_fail() fault injection framework and extending
> the ALLOW_ERROR_INJECTION annotation instead and offloading all the
> debugfs configuration logic (block/error-injection.c) into eBPF?
I've looked into plain ALLOW_ERROR_INJECTION-based injection and it
is not very useful. I didn't even now eBPF could use it, but I
looked into other eBPF injections and at least for my uses cases
it was a bit of a mess. I'd have to allow access to certain bio
fields and would have create a stable UAPI for commands and status
using the fake BTF struct access which really would not be a good
idea here as we need to be able to change internals. Additionally
having fully BTF-enabled toolchains in test VMs is not great either.
I've also not actually found any good map type for range lookups,
which is kinda essential here.
> I talked about moderr [1] at LPC 2025. It's a simple error injection
> tool in eBPF for the module subsystem. The suggested direction there was
> to generalize the tool to ideally to no tool at all, and leverage
> bpftrace to describe the error injection conditions a given
> subsystem needs to be tested under. That would let blktests, for
> example, absorb that and simplify the configuration logic this series
> adds in the kernel for debugfs.
I don't think pulling in ebpftrace for simple error injection is a
winning proposition..
>
> A previous attempt to add inline error injection [2] was rejected as too
> intrusive / source-polluting;
I'm not sure a single hand waivy comment counts as rejection, although
I'm not a huge fan of setup_fault_attr - it makes a mess of debugfs and
creates a lot of boilerplate for a single not very much configurable call
site. That might be ok for something like the make_request case
(although I think we can do better as shown in this patch), but for
making random functions fail it is a lot of overhead. These injections
points also are not anywhere near stable enough to be exposed.
next prev parent reply other threads:[~2026-06-02 15:05 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-02 5:45 configurable block error injection Christoph Hellwig
2026-06-02 5:45 ` [PATCH 1/9] block: remove ALLOW_ERROR_INJECTION for should_fail_bio Christoph Hellwig
2026-06-02 5:45 ` [PATCH 2/9] block: consolidate the calls to should_fail_bio Christoph Hellwig
2026-06-02 5:45 ` [PATCH 3/9] block: refactor should_fail_bio and should_fail_request Christoph Hellwig
2026-06-02 5:45 ` [PATCH 4/9] block: move the FAIL_MAKE_REQUEST symbol from lib/ to block/ Christoph Hellwig
2026-06-02 5:45 ` [PATCH 5/9] block: add a macro to initialize the status table Christoph Hellwig
2026-06-02 5:45 ` [PATCH 6/9] block: add a "tag" for block status codes Christoph Hellwig
2026-06-02 5:45 ` [PATCH 7/9] block: add a str_to_blk_op helper Christoph Hellwig
2026-06-02 5:45 ` [PATCH 8/9] block: add configurable error injection Christoph Hellwig
2026-06-02 9:42 ` Keith Busch
2026-06-02 14:46 ` Christoph Hellwig
2026-06-02 17:56 ` Randy Dunlap
2026-06-02 5:45 ` [PATCH 9/9] block: move the fail request code Christoph Hellwig
2026-06-02 9:43 ` configurable block error injection Keith Busch
2026-06-02 9:58 ` Daniel Gomez
2026-06-02 15:05 ` Christoph Hellwig [this message]
2026-06-04 11:06 ` Daniel Gomez
2026-06-05 7:23 ` Christoph Hellwig
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=20260602150503.GA6887@lst.de \
--to=hch@lst.de \
--cc=axboe@kernel.dk \
--cc=bpf@vger.kernel.org \
--cc=brendan.d.gregg@gmail.com \
--cc=corbet@lwn.net \
--cc=da.gomez@kernel.org \
--cc=gost.dev@samsung.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=mcgrof@kernel.org \
--cc=mhiramat@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.