]> git.proxmox.com Git - mirror_zfs.git/commit
zinject: inject device errors into ioctls
authorRob N <rob.norris@klarasystems.com>
Mon, 8 Apr 2024 18:59:04 +0000 (04:59 +1000)
committerGitHub <noreply@github.com>
Mon, 8 Apr 2024 18:59:04 +0000 (11:59 -0700)
commit76d1dde94ca9cac03fa641b4cf9259d98a706e12
tree88ba8e3d941c45364c8dbd833638d9b43d302592
parentba9f587a77e6893390c752491dfacb6ee5d52023
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 <mav@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Rob Norris <rob.norris@klarasystems.com>
Closes #16061
cmd/zinject/zinject.c
include/sys/zio_impl.h
man/man8/zinject.8
man/man8/zpool-events.8
module/zfs/zio.c
module/zfs/zio_inject.c