Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Feb 2019 00:33:02 +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-12@freebsd.org
Subject:   svn commit: r344071 - stable/12/sys/kern
Message-ID:  <201902130033.x1D0X21W096150@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Wed Feb 13 00:33:01 2019
New Revision: 344071
URL: https://svnweb.freebsd.org/changeset/base/344071

Log:
  MFC r343585: 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.

Modified:
  stable/12/sys/kern/subr_disk.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/kern/subr_disk.c
==============================================================================
--- stable/12/sys/kern/subr_disk.c	Wed Feb 13 00:10:12 2019	(r344070)
+++ stable/12/sys/kern/subr_disk.c	Wed Feb 13 00:33:01 2019	(r344071)
@@ -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?201902130033.x1D0X21W096150>