Browse files

zio_dva_throttle_done() should allow zinjected ZIO

If fault injection is enabled, the ZIO_FLAG_IO_RETRY could be set by
zio_handle_device_injection() to generate the FMA events and update
stats. Hence, ignore the flag and process such zios.

A better fix would be to add another flag in the zio_t to indicate that
the zio is failed because of a zinject rule. However, considering the
fact that we do this in debug bits, we could do with the crude check
using the global flag zio_injection_enabled which is set to 1 when
zinject records are added.

Reviewed-by: Brian Behlendorf <>
Signed-off-by: Sanjeev Bagewadi <>
Closes #6383 
Closes #6384
  • Loading branch information...
sanjeevbagewadi authored and tonyhutter committed Aug 10, 2017
1 parent 4bdb8fc commit 2d9b57d39fde8906ab07fbb130412970f7801329
Showing with 2 additions and 1 deletion.
  1. +2 −1 module/zfs/zio.c
@@ -3661,7 +3661,8 @@ zio_dva_throttle_done(zio_t *zio)
ASSERT3U(zio->io_child_type, ==, ZIO_CHILD_VDEV);
ASSERT3P(vd, ==, vd->vdev_top);
ASSERT(zio_injection_enabled || !(zio->io_flags & ZIO_FLAG_IO_RETRY));
ASSERT(!(zio->io_flags & ZIO_FLAG_IO_REPAIR));
ASSERT(!(lio->io_flags & ZIO_FLAG_IO_REWRITE));
ASSERT(!(lio->io_orig_flags & ZIO_FLAG_NODATA));

0 comments on commit 2d9b57d

Please sign in to comment.