Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Jan 2019 17:24:51 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r343585 - head/sys/kern
Message-ID:  <201901301724.x0UHOp9h057277@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Wed Jan 30 17:24:50 2019
New Revision: 343585
URL: https://svnweb.freebsd.org/changeset/base/343585

Log:
  Only sort requests of types that have concept of offset.
  
  Other types, such as BIO_FLUSH or BIO_ZONE, or especially new/unknown ones,
  may imply some degree of ordering even if strict ordering is not requested
  explicitly.
  
  MFC after:	2 weeks
  Sponsored by:	iXsystems, Inc.

Modified:
  head/sys/kern/subr_disk.c

Modified: head/sys/kern/subr_disk.c
==============================================================================
--- head/sys/kern/subr_disk.c	Wed Jan 30 17:11:08 2019	(r343584)
+++ head/sys/kern/subr_disk.c	Wed Jan 30 17:24:50 2019	(r343585)
@@ -259,6 +259,17 @@ bioq_disksort(struct bio_queue_head *head, struct bio 
 		return;
 	}
 
+	/*
+	 * We should only sort requests of types that have concept of offset.
+	 * Other types, such as BIO_FLUSH or BIO_ZONE, may imply some degree
+	 * of ordering even if strict ordering is not requested explicitly.
+	 */
+	if (bp->bio_cmd != BIO_READ && bp->bio_cmd != BIO_WRITE &&
+	    bp->bio_cmd != BIO_DELETE) {
+		bioq_insert_tail(head, bp);
+		return;
+	}
+
 	if (bioq_batchsize > 0 && head->batched > bioq_batchsize) {
 		bioq_insert_tail(head, bp);
 		return;



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