Linux Documentation
 help / color / mirror / Atom feed
From: Mohamed Khalfella <mkhalfella@purestorage.com>
To: Haris Iqbal <haris.iqbal@linux.dev>
Cc: Jens Axboe <axboe@kernel.dk>,
	linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
	Christoph Hellwig <hch@lst.de>, Keith Busch <kbusch@kernel.org>,
	Jonathan Corbet <corbet@lwn.net>,
	linux-doc@vger.kernel.org,
	Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Subject: Re: [v3 for-next 0/3] block: delay support for error injection
Date: Wed, 28 Oct 2026 10:19:36 -0700	[thread overview]
Message-ID: <20261028171936.GA122209-mkhalfella@purestorage.com> (raw)
In-Reply-To: <7efb1e79-f4a3-48a1-a08c-20eeb6369bbd@linux.dev>

On Wed 2026-10-28 15:51:38 +0100, Haris Iqbal wrote:
> 
> 
> On 10/22/26 22:23, Mohamed Khalfella wrote:
> > Hello,
> > 
> > I wanted to use the delay injection for a test case that I am currently
> > working on [1]. Are you still working on these changes?
> 
> Hello,
> 
> Yes. But currently I am moving houses and hence did not get a chance to 
> look at the comments. I plan to send a v4 with changes based on the 
> comments next week.

Great, thank you. 

> 
> > 
> > 1- https://lore.kernel.org/all/20261022185920.GA2931-mkhalfella@purestorage.com/
> > 
> > 
> > On Tue 2026-09-29 00:16:31 +0200, Md Haris Iqbal wrote:
> >> Error injection can only fail a bio today.  This adds a delay_us option so
> >> that a rule can hold a bio back first, to model a slow device.  The delay
> >> happens above the driver, so it tests the code waiting above the block
> >> layer, not the blk-mq timeout handler.
> >>
> >> A delayed bio is marked with a new BIO_ERROR_INJECTED flag so the rules
> >> are not applied to it again, even after a split.  Christoph asked on v2
> >> to avoid the flag by allowing a delay only together with an error.  I kept
> >> delay-only rules, as a slow device that succeeds is the more useful case,
> >> so the flag question is still open.
> >>
> >> Holding a bio back reorders it against bios submitted later, which breaks
> >> sequential write ordering on zoned devices.
> >>
> >> Patch 1 is a prep cleanup.  It moves the rejection of an unknown status
> >> tag into the parser, because patch 2 makes a rule without a status valid.
> >>
> >> Tested in a VM.
> >>
> >> v1: https://lore.kernel.org/linux-block/20260827000115.128093-1-haris.iqbal@linux.dev/
> >> v2: https://lore.kernel.org/linux-block/20260830012002.80275-1-haris.iqbal@linux.dev/
> >>
> >> Changes since v2:
> >>
> >>   - Patch 1: return bool, rewrite the commit message.
> >>
> >>   - Patch 2: drop __submit_bio_noacct_nocheck(); the flag alone stops the
> >>     rules being applied again.  Log the error when a delayed bio is failed.
> >>
> >>   - Patch 3: trim the documentation.
> >>
> >> Changes since v1:
> >>
> >>   - Add the BIO_ERROR_INJECTED bio flag.  v1 only resubmitted a delayed bio
> >>     below the injection hook, which left the remainder of a split going
> >>     through the hook and matching the same rule again, so a bio was held
> >>     once per split instead of once.
> >>
> >>   - Patch 1: tag_to_blk_status() returns an error and passes the status back
> >>     through a pointer, instead of returning BLK_STS_OK for both the "OK" tag
> >>     and an unknown one.  A delay-only rule has no status, so the two have to
> >>     be told apart.
> >>
> >>   - Documentation: a delayed bio is held once rather than once per split.
> >>
> >> Md Haris Iqbal (3):
> >>    block: Reject unknown status tags in error injection rules
> >>    block: allow error injection rules to delay bios
> >>    Documentation: block: document error injection delay feature
> >>
> >>   Documentation/block/error-injection.rst |  39 +++++-
> >>   block/blk-core.c                        |  14 +-
> >>   block/blk.h                             |   2 +-
> >>   block/error-injection.c                 | 167 +++++++++++++++++++++---
> >>   block/error-injection.h                 |   1 +
> >>   include/linux/blk_types.h               |   1 +
> >>   6 files changed, 192 insertions(+), 32 deletions(-)
> >>
> >> -- 
> >> 2.53.0
> >>
> 

      reply	other threads:[~2026-10-28 17:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-28 22:16 [v3 for-next 0/3] block: delay support for error injection Md Haris Iqbal
2026-09-28 22:16 ` [v3 for-next 1/3] block: Reject unknown status tags in error injection rules Md Haris Iqbal
2026-10-05  8:49   ` Christoph Hellwig
2026-10-20 22:34     ` Mohamed Khalfella
2026-09-28 22:16 ` [v3 for-next 2/3] block: allow error injection rules to delay bios Md Haris Iqbal
2026-10-05  8:56   ` Christoph Hellwig
2026-10-20 23:34   ` Mohamed Khalfella
2026-09-28 22:16 ` [v3 for-next 3/3] Documentation: block: document error injection delay feature Md Haris Iqbal
2026-10-05  8:56   ` Christoph Hellwig
2026-10-22 20:23 ` [v3 for-next 0/3] block: delay support for error injection Mohamed Khalfella
2026-10-28 14:51   ` Haris Iqbal
2026-10-28 17:19     ` Mohamed Khalfella [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=20261028171936.GA122209-mkhalfella@purestorage.com \
    --to=mkhalfella@purestorage.com \
    --cc=axboe@kernel.dk \
    --cc=corbet@lwn.net \
    --cc=haris.iqbal@linux.dev \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shinichiro.kawasaki@wdc.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