Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/raidframe Bail if rf_numParityRegions is not > 0. C...



details:   https://anonhg.NetBSD.org/src/rev/41ab932726cd
branches:  trunk
changeset: 480267:41ab932726cd
user:      oster <oster%NetBSD.org@localhost>
date:      Sat Jan 08 05:13:26 2000 +0000

description:
Bail if rf_numParityRegions is not > 0.  Cleanup a comment.

diffstat:

 sys/dev/raidframe/rf_paritylogging.c |  32 ++++++++++++++++++++------------
 1 files changed, 20 insertions(+), 12 deletions(-)

diffs (54 lines):

diff -r 591fa3b563b1 -r 41ab932726cd sys/dev/raidframe/rf_paritylogging.c
--- a/sys/dev/raidframe/rf_paritylogging.c      Sat Jan 08 04:40:25 2000 +0000
+++ b/sys/dev/raidframe/rf_paritylogging.c      Sat Jan 08 05:13:26 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rf_paritylogging.c,v 1.4 2000/01/05 02:57:29 oster Exp $       */
+/*     $NetBSD: rf_paritylogging.c,v 1.5 2000/01/08 05:13:26 oster Exp $       */
 /*
  * Copyright (c) 1995 Carnegie-Mellon University.
  * All rights reserved.
@@ -81,6 +81,9 @@
        RF_ParityLog_t *l = NULL, *next;
        caddr_t lHeapPtr;
 
+       if (rf_numParityRegions <= 0)
+               return(EINVAL);
+
        /*
          * We create multiple entries on the shutdown list here, since
          * this configuration routine is fairly complicated in and of
@@ -127,18 +130,23 @@
 
        /* configure parity log parameters
         * 
-        * parameter               comment/constraints ----------------
-        * ------------------- numParityRegions        all regions (except
-        * possibly last) of equal size totalInCoreLogCapacity  amount of
-        * memory in bytes available for in-core logs (default 1 MB) #
-        * numSectorsPerLog        capacity of an in-core log in sectors (1
-        * disk track) numParityLogs           total number of in-core logs,
-        * should be at least numParityRegions regionLogCapacity       size of
-        * a region log (except possibly last one) in sectors totalLogCapacity
-        * total amount of log space in sectors
+        * parameter               comment/constraints 
+        * ------------------------------------------- 
+        * numParityRegions*       all regions (except possibly last) 
+        *                         of equal size 
+        * totalInCoreLogCapacity* amount of memory in bytes available 
+        *                         for in-core logs (default 1 MB) 
+        * numSectorsPerLog#       capacity of an in-core log in sectors 
+        *                         (1 * disk track)
+        * numParityLogs           total number of in-core logs,
+        *                         should be at least numParityRegions 
+        * regionLogCapacity       size of a region log (except possibly 
+        *                         last one) in sectors 
+        * totalLogCapacity        total amount of log space in sectors
         * 
-        * denotes a user settable parameter. # logs are fixed to be the size of
-        * a disk track, value #defined in rf_paritylog.h
+        * where '*' denotes a user settable parameter. 
+        * Note that logs are fixed to be the size of a disk track, 
+        * value #defined in rf_paritylog.h
         * 
         */
 



Home | Main Index | Thread Index | Old Index