diff options
| author | Christoph Hellwig <hch@lst.de> | 2026-06-11 16:06:47 +0200 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2026-06-12 10:40:35 -0600 |
| commit | e8dcf2d142bd720c8334233ad6cfdf00f0e76b7f (patch) | |
| tree | fefe7d557847f9db46119ac89b8c14483f2d645b /include/linux | |
| parent | d39a63ead381c7ee93cd938ea2d759c17343b522 (diff) | |
| download | lwn-e8dcf2d142bd720c8334233ad6cfdf00f0e76b7f.tar.gz lwn-e8dcf2d142bd720c8334233ad6cfdf00f0e76b7f.zip | |
block: add configurable error injection
Add a new block error injection interface that allows to inject specific
status code for specific ranges.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Hannes Reinecke <hare@kernel.org>
Reviewed-by: Md Haris Iqbal <haris.iqbal@linux.dev>
Link: https://patch.msgid.link/20260611140703.2401204-5-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/blkdev.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 57e84d59a642..5070851cf924 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -176,6 +176,7 @@ struct gendisk { #define GD_SUPPRESS_PART_SCAN 5 #define GD_OWNS_QUEUE 6 #define GD_ZONE_APPEND_USED 7 +#define GD_ERROR_INJECT 8 struct mutex open_mutex; /* open/close mutex */ unsigned open_partitions; /* number of open partitions */ @@ -227,6 +228,11 @@ struct gendisk { */ struct blk_independent_access_ranges *ia_ranges; +#ifdef CONFIG_BLK_ERROR_INJECTION + struct mutex error_injection_lock; + struct list_head error_injection_list; +#endif + struct mutex rqos_state_mutex; /* rqos state change mutex */ }; |
