Skip to content

Commit

Permalink
Fix zio->io_priority failed (7 < 6) assert
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
tonyhutter authored and lundman committed Oct 11, 2018
1 parent b6e54d7 commit 2f0eb9f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions module/zfs/vdev_queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -863,6 +863,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);

Expand Down

0 comments on commit 2f0eb9f

Please sign in to comment.