Skip to content

Commit

Permalink
Handle FLUSH errors as "expected"
Browse files Browse the repository at this point in the history
Before openzfs#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 <[email protected]>
Reviewed-by: Rob Norris <[email protected]>
Signed-off-by:	Alexander Motin <[email protected]>
Sponsored by:	iXsystems, Inc.
Closes openzfs#16110
  • Loading branch information
amotin authored and lundman committed Sep 4, 2024
1 parent 3bf46a8 commit 813bf15
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion module/zfs/zio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 813bf15

Please sign in to comment.