Permalink
Browse files

Only record zio->io_delay on reads and writes

While investigating #6425 I
noticed that ioctl ZIOs were not setting zio->io_delay correctly.  They
would set the start time in zio_vdev_io_start(), but never set the end
time in zio_vdev_io_done(), since ioctls skip it and go straight to
zio_done().  This was causing spurious "delayed IO" events to appear,
which would eventually get rate-limited and displayed as
"Missed events" messages in zed.

To get around the problem, this patch only sets zio->io_delay for read
and write ZIOs, since that's all we care about anyway.

Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Closes #6425
Closes #6440
  • Loading branch information...
tonyhutter committed Aug 2, 2017
1 parent 12acabe commit 07cbcd5089d65a5b8b9769a412833747f045530c
Showing with 1 addition and 1 deletion.
  1. +1 −1 module/zfs/zio.c
@@ -3278,9 +3278,9 @@ zio_vdev_io_start(zio_t *zio)
zio_interrupt(zio);
return (ZIO_PIPELINE_STOP);
}
zio->io_delay = gethrtime();
}

zio->io_delay = gethrtime();
vd->vdev_ops->vdev_op_io_start(zio);
return (ZIO_PIPELINE_STOP);
}

0 comments on commit 07cbcd5

Please sign in to comment.