summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTony Hutter <[email protected]>2018-05-29 18:13:48 -0700
committerBrian Behlendorf <[email protected]>2018-05-29 18:13:48 -0700
commitc26cf0966d131b722c32f8ccecfe5791a789d975 (patch)
treeb0a9950a2803c04610996323cc9ac1d54eb8ce00
parent3c28c636424f26b5638e27d238fd52e6598e9900 (diff)
Fix zio->io_priority failed (7 < 6) assert
This fixes an assert in vdev_queue_change_io_priority(): VERIFY3(zio->io_priority < ZIO_PRIORITY_NUM_QUEUEABLE) failed (7 < 6) PANIC at vdev_queue.c:832:vdev_queue_change_io_priority() Reviewed-by: Tom Caputi <[email protected]> Reviewed-by: George Melikov <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Tony Hutter <[email protected]> Closes #7566 Closes #7542
-rw-r--r--module/zfs/vdev_queue.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/module/zfs/vdev_queue.c b/module/zfs/vdev_queue.c
index 4f29d0043..75a123ece 100644
--- a/module/zfs/vdev_queue.c
+++ b/module/zfs/vdev_queue.c
@@ -829,6 +829,15 @@ vdev_queue_change_io_priority(zio_t *zio, zio_priority_t priority)
vdev_queue_t *vq = &zio->io_vd->vdev_queue;
avl_tree_t *tree;
+ /*
+ * ZIO_PRIORITY_NOW is used by the vdev cache code and the aggregate zio
+ * code to issue IOs without adding them to the vdev queue. In this
+ * case, the zio is already going to be issued as quickly as possible
+ * and so it doesn't need any reprioitization to help.
+ */
+ if (zio->io_priority == ZIO_PRIORITY_NOW)
+ return;
+
ASSERT3U(zio->io_priority, <, ZIO_PRIORITY_NUM_QUEUEABLE);
ASSERT3U(priority, <, ZIO_PRIORITY_NUM_QUEUEABLE);