From: Haris Iqbal <haris.iqbal@linux.dev>
To: Christoph Hellwig <hch@lst.de>, Jens Axboe <axboe@kernel.dk>
Cc: 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
Subject: Re: configurable block error injection v5
Date: Fri, 12 Jun 2026 16:10:06 +0200 [thread overview]
Message-ID: <33309e37-e999-4c4c-a2b6-5eff22b1e933@linux.dev> (raw)
In-Reply-To: <20260611140703.2401204-1-hch@lst.de>
On 6/11/26 16:06, Christoph Hellwig wrote:
> Hi all,
>
> this series adds a new configurable block error injection facility.
> We already have a few to inject block errors, but unfortunately most
> of them are either not very useful or hard to use, or both:
>
> - The fail_make_request failure injection point can't distinguish
> different commands, different ranges in the file and can only injection
> plain I/O errors.
> - the should_fail_bio 'dynamic' failure injection has all the same issues
> as fail_make_request
> - dm-error can only fail all command in the table using BLK_STS_IOERR
> and requires setting up a new block device
> - dm-flakey and dm-dust allow all kinds of configurability, but still
> don't have good error selection, no good support for non-read/write
> commands and are limited to the dm table alignment requirements,
> which for zoned devices enforces setting them up for an entire zone.
> They also once again require setting up a stacked block device,
> which is really annoying in harnesses like xfstests
>
> This series adds a new debugfs-based block layer error injection
> that allows to configure what operations and ranges the injection
> applied to, and what status to return. It also allows to configure a
> failure ratio similar to the xfs errortag injection.
>
> Changes since v4:
> - don't unlock in removeall to avoid a race between removeall and setup
> - document why we can't match 0-sized bios
>
> Changes since v3:
> - use a static branch to guard the new condition
> - split out a new header so that jump_label.h doesn't get pulled into
> blk.h
> - more checking for impossible conditions in blk_status_to_tag
> - more spelling fixes
>
> Changes since v2:
> - improve the documentation a bit
> - fix a spelling mistake in a comment
>
> Changes since v1:
> - drop the should_fail_bio removal and cleanup depending on it, as it's
> used by eBPF programs and thus a hidden UABI.
> - as a result split the code out to it's own Kconfig symbol
> - various error handling fixed pointed out by Keith
> - documentation spelling fixes pointed out by Randy
>
> Diffstat:
> Documentation/block/error-injection.rst | 59 +++++
> Documentation/block/index.rst | 1
> block/Kconfig | 8
> block/Makefile | 1
> block/blk-core.c | 87 ++++++--
> block/blk-sysfs.c | 5
> block/blk.h | 3
> block/error-injection.c | 315 ++++++++++++++++++++++++++++++++
> block/error-injection.h | 21 ++
> block/genhd.c | 4
> include/linux/blkdev.h | 6
> 11 files changed, 490 insertions(+), 20 deletions(-)
Thank you for this series. It is a nice addition.
Reviewed-by: Md Haris Iqbal <haris.iqbal@linux.dev>
(for the whole series)
>
next prev parent reply other threads:[~2026-06-12 14:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-11 14:06 configurable block error injection v5 Christoph Hellwig
2026-06-11 14:06 ` [PATCH 1/4] block: add a macro to initialize the status table Christoph Hellwig
2026-06-11 14:06 ` [PATCH 2/4] block: add a "tag" for block status codes Christoph Hellwig
2026-06-11 14:06 ` [PATCH 3/4] block: add a str_to_blk_op helper Christoph Hellwig
2026-06-11 14:06 ` [PATCH 4/4] block: add configurable error injection Christoph Hellwig
2026-06-12 14:10 ` Haris Iqbal [this message]
2026-06-12 16:44 ` configurable block error injection v5 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=33309e37-e999-4c4c-a2b6-5eff22b1e933@linux.dev \
--to=haris.iqbal@linux.dev \
--cc=axboe@kernel.dk \
--cc=corbet@lwn.net \
--cc=dlemoal@kernel.org \
--cc=hare@suse.de \
--cc=hch@lst.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