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 don't try to read disklabel for attached xb...



details:   https://anonhg.NetBSD.org/src/rev/4bda5d629137
branches:  trunk
changeset: 966169:4bda5d629137
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Wed Oct 16 19:38:13 2019 +0000

description:
don't try to read disklabel for attached xbd* disk from (effectively) always
xbd0a device, there is no need for it and it is just wrong

same problem as PR kern/41704 for cgd

XXX perhaps xbd should use native block size passed from dom0 rather then
XXX recomputing in DEV_BSIZE

diffstat:

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

diffs (32 lines):

diff -r d8795016eafd -r 4bda5d629137 sys/arch/xen/xen/xbd_xenbus.c
--- a/sys/arch/xen/xen/xbd_xenbus.c     Wed Oct 16 19:03:53 2019 +0000
+++ b/sys/arch/xen/xen/xbd_xenbus.c     Wed Oct 16 19:38:13 2019 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: xbd_xenbus.c,v 1.92 2019/02/02 12:32:55 cherry Exp $      */
+/*      $NetBSD: xbd_xenbus.c,v 1.93 2019/10/16 19:38:13 jdolecek Exp $      */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -50,7 +50,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xbd_xenbus.c,v 1.92 2019/02/02 12:32:55 cherry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xbd_xenbus.c,v 1.93 2019/10/16 19:38:13 jdolecek Exp $");
 
 #include "opt_xen.h"
 
@@ -587,12 +587,11 @@
 
                sc->sc_backend_status = BLKIF_STATE_CONNECTED;
 
-               /* try to read the disklabel */
-               dk_getdisklabel(&sc->sc_dksc, 0 /* XXX ? */);
                format_bytes(buf, sizeof(buf), sc->sc_sectors * sc->sc_secsize);
                aprint_verbose_dev(sc->sc_dksc.sc_dev,
                                "%s, %d bytes/sect x %" PRIu64 " sectors\n",
                                buf, (int)dg->dg_secsize, sc->sc_xbdsize);
+
                /* Discover wedges on this disk. */
                dkwedge_discover(&sc->sc_dksc.sc_dkdev);
 



Home | Main Index | Thread Index | Old Index