summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorTony Hutter <[email protected]>2017-08-02 09:08:38 -0700
committerTony Hutter <[email protected]>2017-08-02 11:37:18 -0700
commit07cbcd5089d65a5b8b9769a412833747f045530c (patch)
tree14d7934d094874cc3eea954d999f06ef27d1f275 /module
parent12acabe2a49fddbf25e9affc8d920ef679780734 (diff)
Only record zio->io_delay on reads and writes
While investigating https://github.com/zfsonlinux/zfs/issues/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 <[email protected]> Reviewed-by: George Melikov <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Tony Hutter <[email protected]> Closes #6425 Closes #6440
Diffstat (limited to 'module')
-rw-r--r--module/zfs/zio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/module/zfs/zio.c b/module/zfs/zio.c
index acfc49eb5..82e801e83 100644
--- a/module/zfs/zio.c
+++ b/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);
}