Linux Documentation
 help / color / mirror / Atom feed
* [RFC for-next 0/3] block: delay support for error injection
@ 2026-08-27  0:01 Md Haris Iqbal
  2026-08-27  0:01 ` [RFC for-next 1/3] block: reject unknown status tags in error injection rules Md Haris Iqbal
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Md Haris Iqbal @ 2026-08-27  0:01 UTC (permalink / raw)
  To: Jens Axboe
  Cc: linux-block, linux-doc, linux-kernel, Jonathan Corbet,
	Md Haris Iqbal

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 is invisible to the I/O
statistics and never reaches the blk-mq timeout handler or SCSI error
handling.  What it does exercise is the code waiting above the block
layer: io_uring cancellation, hung task detection, and filesystem or
userspace timeouts.

Two things are worth a look.  A delayed bio is resubmitted below the
injection hook, so the rules are not applied to it again and it can never
pick up a status from another rule.  And holding a bio back reorders it
against bios submitted later, which breaks sequential write ordering on
zoned devices.  Both are documented in patch 3.

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.

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 delays

 Documentation/block/error-injection.rst |  56 ++++++++-
 block/blk-core.c                        |  13 +-
 block/blk.h                             |   1 +
 block/error-injection.c                 | 154 +++++++++++++++++++++---
 4 files changed, 201 insertions(+), 23 deletions(-)

-- 
2.53.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-08-27 22:44 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-27  0:01 [RFC for-next 0/3] block: delay support for error injection Md Haris Iqbal
2026-08-27  0:01 ` [RFC for-next 1/3] block: reject unknown status tags in error injection rules Md Haris Iqbal
2026-08-27  0:01 ` [RFC for-next 2/3] block: allow error injection rules to delay bios Md Haris Iqbal
2026-08-27 13:02   ` Haris Iqbal
2026-08-27 22:44     ` Haris Iqbal
2026-08-27  0:01 ` [RFC for-next 3/3] Documentation: block: document error injection delays Md Haris Iqbal
2026-08-27  3:49 ` [RFC for-next 0/3] block: delay support for error injection Keith Busch
2026-08-27 22:40   ` Haris Iqbal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox