]> git.proxmox.com Git - mirror_zfs.git/commitdiff
Handle FLUSH errors as "expected"
authorAlexander Motin <mav@FreeBSD.org>
Fri, 19 Apr 2024 23:18:54 +0000 (19:18 -0400)
committerGitHub <noreply@github.com>
Fri, 19 Apr 2024 23:18:54 +0000 (16:18 -0700)
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.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Rob Norris <rob.norris@klarasystems.com>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored by: iXsystems, Inc.
Closes #16110

module/zfs/zio.c

index 414e3d4e93bd93f7e2522e227924205bfd7cd09d..1ba99f4d4624f7fd81514b267a6e35cb8927023d 100644 (file)
@@ -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 {