From be1795714b6b297bf90e4d4b52b45bc0b62c092c Mon Sep 17 00:00:00 2001 From: Alexander Motin Date: Thu, 18 Apr 2024 13:37:06 -0400 Subject: [PATCH] Handle FLUSH errors as "expected" Before #16061 zio_vdev_io_done() was not used for FLUSH requests. Addition of it triggers reprobe each TXG for vdevs not supporting them. Since those errors are often expected, they are normally handled by individual vdev drivers and should be ignored here. Signed-off-by: Alexander Motin Sponsored by: iXsystems, Inc. --- module/zfs/zio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/zfs/zio.c b/module/zfs/zio.c index 414e3d4e93..1ba99f4d46 100644 --- a/module/zfs/zio.c +++ b/module/zfs/zio.c @@ -4114,7 +4114,8 @@ zio_vdev_io_done(zio_t *zio) if (zio_injection_enabled && zio->io_error == 0) zio->io_error = zio_handle_label_injection(zio, EIO); - if (zio->io_error && zio->io_type != ZIO_TYPE_TRIM) { + if (zio->io_error && zio->io_type != ZIO_TYPE_FLUSH && + zio->io_type != ZIO_TYPE_TRIM) { if (!vdev_accessible(vd, zio)) { zio->io_error = SET_ERROR(ENXIO); } else {