From: Tao Cui <cui.tao@linux.dev>
To: Md Haris Iqbal <haris.iqbal@linux.dev>, Jens Axboe <axboe@kernel.dk>
Cc: cui.tao@linux.dev, Christoph Hellwig <hch@lst.de>,
Damien Le Moal <dlemoal@kernel.org>,
Hannes Reinecke <hare@kernel.org>,
linux-block@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Documentation: block: fix the sector 0 error injection example
Date: Mon, 17 Aug 2026 15:04:44 +0800 [thread overview]
Message-ID: <8880be8c-2231-461e-b338-e462cea2acf6@linux.dev> (raw)
In-Reply-To: <20260815191100.43956-1-haris.iqbal@linux.dev>
在 2026/8/16 03:11, Md Haris Iqbal 写道:
> The first error injection example is introduced as failing one in ten
> reads of sector 0, but the rule it shows does not set nr_sectors, which
> defaults to the remainder of the device. As written it fails one in ten
> reads of the whole device.
>
> Add nr_sectors=1 so that the rule does what the text says. This also
> gives the documentation one example that uses nr_sectors.
>
> Fixes: e8dcf2d142bd ("block: add configurable error injection")
> Signed-off-by: Md Haris Iqbal <haris.iqbal@linux.dev>
> ---
> Documentation/block/error-injection.rst | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Documentation/block/error-injection.rst b/Documentation/block/error-injection.rst
> --- a/Documentation/block/error-injection.rst
> +++ b/Documentation/block/error-injection.rst
> @@ -48,7 +48,7 @@ Example
>
> Return BLK_STS_IOERR for one in 10 reads of sector 0 of /dev/nvme0n1:
>
> - $ echo 'add,op=READ,start=0,status=IOERR,chance=10' > /sys/kernel/debug/block/nvme0n1/error_injection
> + $ echo 'add,op=READ,start=0,nr_sectors=1,status=IOERR,chance=10' > /sys/kernel/debug/block/nvme0n1/error_injection
>
> Return BLK_STS_MEDIUM for every write to /dev/nvme0n1:
>
> --
> 2.53.0
>
>
Reviewed-by: Tao Cui <cuitao@kylinos.cn>
prev parent reply other threads:[~2026-08-17 7:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-15 19:11 [PATCH] Documentation: block: fix the sector 0 error injection example Md Haris Iqbal
2026-08-17 6:57 ` Christoph Hellwig
2026-08-17 7:04 ` Tao Cui [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=8880be8c-2231-461e-b338-e462cea2acf6@linux.dev \
--to=cui.tao@linux.dev \
--cc=axboe@kernel.dk \
--cc=dlemoal@kernel.org \
--cc=hare@kernel.org \
--cc=haris.iqbal@linux.dev \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@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