Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/xen/xen adjust the condition for max indirect segme...



details:   https://anonhg.NetBSD.org/src/rev/03d4afd76cb8
branches:  trunk
changeset: 971317:03d4afd76cb8
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Tue Apr 21 13:31:08 2020 +0000

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

diffstat:

 sys/arch/xen/xen/xbd_xenbus.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 5893d7e279fe -r 03d4afd76cb8 sys/arch/xen/xen/xbd_xenbus.c
--- a/sys/arch/xen/xen/xbd_xenbus.c     Tue Apr 21 12:23:13 2020 +0000
+++ b/sys/arch/xen/xen/xbd_xenbus.c     Tue Apr 21 13:31:08 2020 +0000
@@ -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 @@
            "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;
        }



Home | Main Index | Thread Index | Old Index