Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/raidframe If our raid is now accessed from wedges, a...



details:   https://anonhg.NetBSD.org/src/rev/3eae5bd516c5
branches:  trunk
changeset: 778626:3eae5bd516c5
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Apr 07 01:39:38 2012 +0000

description:
If our raid is now accessed from wedges, adjust the root to be the wedge
that corresponds to partition a. Is there a better way?

diffstat:

 sys/dev/raidframe/rf_netbsdkintf.c |  13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diffs (34 lines):

diff -r db7d12ddb2d3 -r 3eae5bd516c5 sys/dev/raidframe/rf_netbsdkintf.c
--- a/sys/dev/raidframe/rf_netbsdkintf.c        Fri Apr 06 23:48:53 2012 +0000
+++ b/sys/dev/raidframe/rf_netbsdkintf.c        Sat Apr 07 01:39:38 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rf_netbsdkintf.c,v 1.296 2012/02/16 06:52:03 buhrow Exp $      */
+/*     $NetBSD: rf_netbsdkintf.c,v 1.297 2012/04/07 01:39:38 christos Exp $    */
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2008-2011 The NetBSD Foundation, Inc.
@@ -101,7 +101,7 @@
  ***********************************************************/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.296 2012/02/16 06:52:03 buhrow Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.297 2012/04/07 01:39:38 christos Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -479,7 +479,14 @@
        /* we found something bootable... */
 
        if (num_root == 1) {
-               booted_device = raid_softc[rootID].sc_dev;
+               if (raid_softc[rootID].sc_dkdev.dk_nwedges != 0) {
+                       /* XXX: How do we find the real root partition? */
+                       char cname[sizeof(cset->ac->devname)];
+                       snprintf(cname, sizeof(cname), "%s%c",
+                           device_xname(raid_softc[rootID].sc_dev), 'a');
+                       booted_device = dkwedge_find_by_wname(cname);
+               } else
+                       booted_device = raid_softc[rootID].sc_dev;
        } else if (num_root > 1) {
 
                /* 



Home | Main Index | Thread Index | Old Index