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 The disk size reported in the xenstore is a...



details:   https://anonhg.NetBSD.org/src/rev/847cd736cc45
branches:  trunk
changeset: 378129:847cd736cc45
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Fri Jul 21 11:21:55 2023 +0000

description:
The disk size reported in the xenstore is always in XEN_BSIZE units,
not sector-size. Should fix the issue reported by Christian Kujau
on netbsd-users and port-xen.

diffstat:

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

diffs (27 lines):

diff -r 9eb759b8ef8f -r 847cd736cc45 sys/arch/xen/xen/xbd_xenbus.c
--- a/sys/arch/xen/xen/xbd_xenbus.c     Fri Jul 21 10:26:36 2023 +0000
+++ b/sys/arch/xen/xen/xbd_xenbus.c     Fri Jul 21 11:21:55 2023 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: xbd_xenbus.c,v 1.131 2023/02/25 00:35:15 riastradh Exp $      */
+/*      $NetBSD: xbd_xenbus.c,v 1.132 2023/07/21 11:21:55 bouyer Exp $      */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -50,7 +50,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xbd_xenbus.c,v 1.131 2023/02/25 00:35:15 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xbd_xenbus.c,v 1.132 2023/07/21 11:21:55 bouyer Exp $");
 
 #include "opt_xen.h"
 
@@ -674,7 +674,7 @@ xbd_backend_changed(void *arg, XenbusSta
                xbd_connect(sc);
                sc->sc_shutdown = BLKIF_SHUTDOWN_RUN;
                sc->sc_xbdsize =
-                   sc->sc_sectors * (uint64_t)sc->sc_secsize / DEV_BSIZE;
+                   sc->sc_sectors * (uint64_t)XEN_BSIZE / DEV_BSIZE;
                dg = &sc->sc_dksc.sc_dkdev.dk_geom;
                memset(dg, 0, sizeof(*dg));
 



Home | Main Index | Thread Index | Old Index