Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Apr 2019 15:51:01 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r346679 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Message-ID:  <201904251551.x3PFp1oC096771@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Thu Apr 25 15:51:00 2019
New Revision: 346679
URL: https://svnweb.freebsd.org/changeset/base/346679

Log:
  MFC r339009 (by allanjude):
  Avoid panic when adjusting priority of a read in the face of an IO error
  
  PR:             231516
  Reported by:    sbruno
  Approved by:    re (rgrimes)
  Obtained from:  ZFS-on-Linux
  X-MFC-with:     334844
  Sponsored by:   Klara Systems
  
  MFV/ZoL:        Fix zio->io_priority failed (7 < 6) assert
  
  commit c26cf0966d131b722c32f8ccecfe5791a789d975
  Author: Tony Hutter <hutter2@llnl.gov>
  Date:   Tue May 29 18:13:48 2018 -0700
  
    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 <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>

Modified:
  stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c
==============================================================================
--- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c	Thu Apr 25 15:48:23 2019	(r346678)
+++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c	Thu Apr 25 15:51:00 2019	(r346679)
@@ -982,6 +982,15 @@ vdev_queue_change_io_priority(zio_t *zio, zio_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);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201904251551.x3PFp1oC096771>