]> git.proxmox.com Git - mirror_zfs.git/commitdiff
Fix zio->io_priority failed (7 < 6) assert
authorTony Hutter <hutter2@llnl.gov>
Wed, 30 May 2018 01:13:48 +0000 (18:13 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 30 May 2018 01:13:48 +0000 (18:13 -0700)
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 <tcaputi@datto.com>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Closes #7566
Closes #7542

module/zfs/vdev_queue.c

index 4f29d0043b070b38e7ec618da5102e530e5ed091..75a123ece57ff19935f3b875818c6e1fc0c1b69c 100644 (file)
@@ -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);