diff options
author | Rob N <[email protected]> | 2024-04-09 04:59:04 +1000 |
---|---|---|
committer | GitHub <[email protected]> | 2024-04-08 11:59:04 -0700 |
commit | 76d1dde94ca9cac03fa641b4cf9259d98a706e12 (patch) | |
tree | 88ba8e3d941c45364c8dbd833638d9b43d302592 /include/sys/zio_impl.h | |
parent | ba9f587a77e6893390c752491dfacb6ee5d52023 (diff) |
zinject: inject device errors into ioctls
Adds 'ioctl' as a valid IO type for device error injection, so we can
simulate a flush error (which OpenZFS currently ignores, but that's by
the by).
To support this, adding ZIO_STAGE_VDEV_IO_DONE to ZIO_IOCTL_PIPELINE,
since that's where device error injection happens. This needs a small
exclusion to avoid the vdev_queue, since flushes are not queued, and I'm
assuming that the various failure responses are still reasonable for
flush failures (probes, media change, etc). This seems reasonable to me,
as a flush failure is not unlike a write failure in this regard, however
this may be too aggressive or subtle to assume in just this change.
Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Reviewed-by: Alexander Motin <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Rob Norris <[email protected]>
Closes #16061
Diffstat (limited to 'include/sys/zio_impl.h')
-rw-r--r-- | include/sys/zio_impl.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/include/sys/zio_impl.h b/include/sys/zio_impl.h index 1c0a44059..4b3726d7e 100644 --- a/include/sys/zio_impl.h +++ b/include/sys/zio_impl.h @@ -153,7 +153,7 @@ enum zio_stage { ZIO_STAGE_READY = 1 << 20, /* RWFCIT */ ZIO_STAGE_VDEV_IO_START = 1 << 21, /* RW--IT */ - ZIO_STAGE_VDEV_IO_DONE = 1 << 22, /* RW---T */ + ZIO_STAGE_VDEV_IO_DONE = 1 << 22, /* RW--IT */ ZIO_STAGE_VDEV_IO_ASSESS = 1 << 23, /* RW--IT */ ZIO_STAGE_CHECKSUM_VERIFY = 1 << 24, /* R----- */ @@ -261,8 +261,7 @@ enum zio_stage { #define ZIO_IOCTL_PIPELINE \ (ZIO_INTERLOCK_STAGES | \ - ZIO_STAGE_VDEV_IO_START | \ - ZIO_STAGE_VDEV_IO_ASSESS) + ZIO_VDEV_IO_STAGES) #define ZIO_TRIM_PIPELINE \ (ZIO_INTERLOCK_STAGES | \ |