Source-Changes-HG archive

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

[src/netbsd-1-5]: src/sys/arch/pmax/stand/common Pull up rev 1.17 from trunk, ...



details:   https://anonhg.NetBSD.org/src/rev/1a0802ec7a3c
branches:  netbsd-1-5
changeset: 489448:1a0802ec7a3c
user:      simonb <simonb%NetBSD.org@localhost>
date:      Wed Sep 13 04:31:22 2000 +0000

description:
Pull up rev 1.17 from trunk, approved by thorpej:
  Add support for booting off RAIDframe RAID1 mirrors.
  If the first partition is of type FS_RAID, then add 64 to the block
  number for each I/O in rzstrategy().

diffstat:

 sys/arch/pmax/stand/common/rz.c |  17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diffs (45 lines):

diff -r 866164e02458 -r 1a0802ec7a3c sys/arch/pmax/stand/common/rz.c
--- a/sys/arch/pmax/stand/common/rz.c   Wed Sep 13 04:29:55 2000 +0000
+++ b/sys/arch/pmax/stand/common/rz.c   Wed Sep 13 04:31:22 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rz.c,v 1.16 2000/03/30 14:45:11 simonb Exp $   */
+/*     $NetBSD: rz.c,v 1.16.4.1 2000/09/13 04:31:22 simonb Exp $       */
 
 /*
  * Copyright (c) 1992, 1993
@@ -48,6 +48,9 @@
 #include "common.h"
 #include "rz.h"
 
+#define        RF_PROTECTED_SECTORS    64      /* XXX refer to <.../rf_optnames.h> */
+
+
 struct rz_softc {
        int     sc_fd;                  /* PROM file id */
        int     sc_ctlr;                /* controller number */
@@ -71,7 +74,7 @@
        int s;
        long offset;
 
-       offset = bn * DEV_BSIZE;
+       offset = bn;
 
        /*
         * Partial-block transfers not handled.
@@ -81,7 +84,15 @@
                return (EINVAL);
        }
 
-       offset += pp->p_offset * DEV_BSIZE;
+       offset += pp->p_offset;
+
+       if (pp->p_fstype == FS_RAID)
+               offset += RF_PROTECTED_SECTORS;
+
+       /*
+        * Convert from blocks to bytes.
+        */
+       offset *= DEV_BSIZE;
 
        if (callv == &callvec) {
                /* No REX on this machine */



Home | Main Index | Thread Index | Old Index