mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2025-06-25 18:48:00 +03:00
vdev_geom: converted injected EIO errors to ENXIO
By the assertion, vdev_geom_io_done() only expects ENXIO on an error when the geom is a top-level (allocating) vdev[1][2]. However, zinject currently can't insert ENXIO directly, possibly because on Solaris outright disk failures were reported with EIO[2][3]. This is a narrow workaround to convert EIO to ENXIO when injections are enabled, to avoid the assertion and allow the test suite to test behaviour related to probe failure on FreeBSD. 1. freebsd/freebsd-src@37ec52ca7a 2. freebsd/freebsd-src@cd730bd6b2 3. illumos/illumos-gate@ea8dc4b6d2 Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alexander Motin <mav@FreeBSD.org> Reviewed-by: Paul Dagnelie <paul.dagnelie@klarasystems.com> Signed-off-by: Rob Norris <rob.norris@klarasystems.com> Closes #17355
This commit is contained in:
parent
2303775fea
commit
0372def8c9
@ -1241,7 +1241,16 @@ vdev_geom_io_done(zio_t *zio)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (bp == NULL) {
|
if (bp == NULL) {
|
||||||
ASSERT3S(zio->io_error, ==, ENXIO);
|
if (zio_injection_enabled && zio->io_error == EIO)
|
||||||
|
/*
|
||||||
|
* Convert an injected EIO to ENXIO. This is needed to
|
||||||
|
* work around zio_handle_device_injection_impl() not
|
||||||
|
* currently being able to inject ENXIO directly, while
|
||||||
|
* the assertion below only allows ENXIO here.
|
||||||
|
*/
|
||||||
|
zio->io_error = SET_ERROR(ENXIO);
|
||||||
|
else
|
||||||
|
ASSERT3S(zio->io_error, ==, ENXIO);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user