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 read feature-persistent value on connect, e...
details: https://anonhg.NetBSD.org/src/rev/a07160565bac
branches: trunk
changeset: 930966:a07160565bac
user: jdolecek <jdolecek%NetBSD.org@localhost>
date: Sat Apr 18 23:24:49 2020 +0000
description:
read feature-persistent value on connect, e.g. the Linux Dom0 writes
the value only together with the device info; no functional difference,
since we don't allow persistent mappings
diffstat:
sys/arch/xen/xen/xbd_xenbus.c | 23 ++++++++++++++---------
1 files changed, 14 insertions(+), 9 deletions(-)
diffs (51 lines):
diff -r 7d2f240fed88 -r a07160565bac sys/arch/xen/xen/xbd_xenbus.c
--- a/sys/arch/xen/xen/xbd_xenbus.c Sat Apr 18 22:03:51 2020 +0000
+++ b/sys/arch/xen/xen/xbd_xenbus.c Sat Apr 18 23:24:49 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: xbd_xenbus.c,v 1.119 2020/04/18 16:58:00 jdolecek Exp $ */
+/* $NetBSD: xbd_xenbus.c,v 1.120 2020/04/18 23:24:49 jdolecek Exp $ */
/*
* Copyright (c) 2006 Manuel Bouyer.
@@ -50,7 +50,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xbd_xenbus.c,v 1.119 2020/04/18 16:58:00 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xbd_xenbus.c,v 1.120 2020/04/18 23:24:49 jdolecek Exp $");
#include "opt_xen.h"
@@ -702,6 +702,18 @@
{
int err;
unsigned long long sectors;
+ u_long val;
+
+ /*
+ * Must read feature-persistent later, e.g. Linux Dom0 writes
+ * this together with the device info.
+ */
+ err = xenbus_read_ul(NULL, sc->sc_xbusd->xbusd_otherend,
+ "feature-persistent", &val, 10);
+ if (err)
+ val = 0;
+ if (val > 0)
+ sc->sc_features |= BLKIF_FEATURE_PERSISTENT;
err = xenbus_read_ul(NULL,
sc->sc_xbusd->xbusd_path, "virtual-device", &sc->sc_handle, 10);
@@ -754,13 +766,6 @@
sc->sc_features |= BLKIF_FEATURE_BARRIER;
err = xenbus_read_ul(NULL, sc->sc_xbusd->xbusd_otherend,
- "feature-persistent", &val, 10);
- if (err)
- val = 0;
- if (val > 0)
- sc->sc_features |= BLKIF_FEATURE_PERSISTENT;
-
- err = xenbus_read_ul(NULL, sc->sc_xbusd->xbusd_otherend,
"feature-max-indirect-segments", &val, 10);
if (err)
val = 0;
Home |
Main Index |
Thread Index |
Old Index