]> www.infradead.org Git - users/hch/misc.git/commit
null_blk: introduce badblocks_once parameter
authorShin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Wed, 26 Feb 2025 10:06:10 +0000 (19:06 +0900)
committerJens Axboe <axboe@kernel.dk>
Mon, 3 Mar 2025 18:17:52 +0000 (11:17 -0700)
commit800c24391676143695d284f70af297b28a809886
treec1ff2b9a7f214426c65774ed704115c7c25dde2a
parent2cadb8ef25a6157b5bd3e8fe0d3e23f32defec25
null_blk: introduce badblocks_once parameter

When IO errors happen on real storage devices, the IOs repeated to the
same target range can success by virtue of recovery features by devices,
such as reserved block assignment. To simulate such IO errors and
recoveries, introduce the new parameter badblocks_once parameter. When
this parameter is set to 1, the specified badblocks are cleared after
the first IO error, so that the next IO to the blocks succeed.

Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Link: https://lore.kernel.org/r/20250226100613.1622564-3-shinichiro.kawasaki@wdc.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/null_blk/main.c
drivers/block/null_blk/null_blk.h