Module Name:    src
Committed By:   jdolecek
Date:           Tue Apr 21 13:31:09 UTC 2020

Modified Files:
        src/sys/arch/xen/xen: xbd_xenbus.c

Log Message:
adjust the condition for max indirect segments to make it clear what
is really needed (enough to map MAXPHYS + 1 page); no functional difference


To generate a diff of this commit:
cvs rdiff -u -r1.121 -r1.122 src/sys/arch/xen/xen/xbd_xenbus.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/xen/xen/xbd_xenbus.c
diff -u src/sys/arch/xen/xen/xbd_xenbus.c:1.121 src/sys/arch/xen/xen/xbd_xenbus.c:1.122
--- src/sys/arch/xen/xen/xbd_xenbus.c:1.121	Sun Apr 19 16:45:08 2020
+++ src/sys/arch/xen/xen/xbd_xenbus.c	Tue Apr 21 13:31:08 2020
@@ -1,4 +1,4 @@
-/*      $NetBSD: xbd_xenbus.c,v 1.121 2020/04/19 16:45:08 jdolecek Exp $      */
+/*      $NetBSD: xbd_xenbus.c,v 1.122 2020/04/21 13:31:08 jdolecek Exp $      */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -50,7 +50,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xbd_xenbus.c,v 1.121 2020/04/19 16:45:08 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xbd_xenbus.c,v 1.122 2020/04/21 13:31:08 jdolecek Exp $");
 
 #include "opt_xen.h"
 
@@ -769,7 +769,7 @@ xbd_features(struct xbd_xenbus_softc *sc
 	    "feature-max-indirect-segments", &val, 10);
 	if (err)
 		val = 0;
-	if (val > (MAXPHYS >> PAGE_SHIFT)) {
+	if (val >= (MAXPHYS >> PAGE_SHIFT) + 1) {
 		/* We can use indirect segments, the limit is big enough */
 		sc->sc_features |= BLKIF_FEATURE_INDIRECT;
 	}

Reply via email to