[Midnightbsd-cvs] src [8662] trunk/sys/geom/geom_io.c: clone BIO_ORDERED flag for disk drivers (like CAM) that try to consume it.

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Sun Sep 25 16:29:29 EDT 2016


Revision: 8662
          http://svnweb.midnightbsd.org/src/?rev=8662
Author:   laffer1
Date:     2016-09-25 16:29:28 -0400 (Sun, 25 Sep 2016)
Log Message:
-----------
clone BIO_ORDERED flag for disk drivers (like CAM) that try to consume it.

Modified Paths:
--------------
    trunk/sys/geom/geom_io.c

Modified: trunk/sys/geom/geom_io.c
===================================================================
--- trunk/sys/geom/geom_io.c	2016-09-25 20:28:58 UTC (rev 8661)
+++ trunk/sys/geom/geom_io.c	2016-09-25 20:29:28 UTC (rev 8662)
@@ -1,4 +1,4 @@
-/* $MidnightBSD: src/sys/geom/geom_io.c,v 1.5 2011/12/10 22:55:34 laffer1 Exp $ */
+/* $MidnightBSD$ */
 /*-
  * Copyright (c) 2002 Poul-Henning Kamp
  * Copyright (c) 2002 Networks Associates Technology, Inc.
@@ -178,6 +178,12 @@
 	if (bp2 != NULL) {
 		bp2->bio_parent = bp;
 		bp2->bio_cmd = bp->bio_cmd;
+		/*
+		 *  BIO_ORDERED flag may be used by disk drivers to enforce
+		 *  ordering restrictions, so this flag needs to be cloned.
+		 *  Other bio flags are not suitable for cloning.
+		 */
+		bp2->bio_flags = bp->bio_flags & BIO_ORDERED;
 		bp2->bio_length = bp->bio_length;
 		bp2->bio_offset = bp->bio_offset;
 		bp2->bio_data = bp->bio_data;



More information about the Midnightbsd-cvs mailing list