Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/raidframe At config time, initialize a small amount ...



details:   https://anonhg.NetBSD.org/src/rev/5fab917b4990
branches:  trunk
changeset: 473436:5fab917b4990
user:      oster <oster%NetBSD.org@localhost>
date:      Fri Jun 04 01:51:00 1999 +0000

description:
At config time, initialize a small amount of space for the disk queues
corresponding to the hot spares.  We'll need that space when a spare is
actually added.  Huge Thanks to Martin Laubach for helping track this down.

diffstat:

 sys/dev/raidframe/rf_diskqueue.c |  14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diffs (35 lines):

diff -r 591240c005ab -r 5fab917b4990 sys/dev/raidframe/rf_diskqueue.c
--- a/sys/dev/raidframe/rf_diskqueue.c  Fri Jun 04 01:50:01 1999 +0000
+++ b/sys/dev/raidframe/rf_diskqueue.c  Fri Jun 04 01:51:00 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rf_diskqueue.c,v 1.6 1999/02/05 00:06:09 oster Exp $   */
+/*     $NetBSD: rf_diskqueue.c,v 1.7 1999/06/04 01:51:00 oster Exp $   */
 /*
  * Copyright (c) 1995 Carnegie-Mellon University.
  * All rights reserved.
@@ -181,7 +181,12 @@
        free(dqd->bp, M_RAIDFRAME);
 }
 /* configures a single disk queue */
-static int 
+int config_disk_queue(RF_Raid_t *, RF_DiskQueue_t *, RF_RowCol_t, 
+                     RF_RowCol_t, RF_DiskQueueSW_t *,
+                     RF_SectorCount_t, dev_t, int, 
+                     RF_ShutdownList_t **,
+                     RF_AllocListElem_t *);
+int 
 config_disk_queue(
     RF_Raid_t * raidPtr,
     RF_DiskQueue_t * diskqueue,
@@ -285,7 +290,10 @@
        }
        raidPtr->Queues = diskQueues;
        for (r = 0; r < raidPtr->numRow; r++) {
-               RF_CallocAndAdd(diskQueues[r], raidPtr->numCol + ((r == 0) ? raidPtr->numSpare : 0), sizeof(RF_DiskQueue_t), (RF_DiskQueue_t *), raidPtr->cleanupList);
+               RF_CallocAndAdd(diskQueues[r], raidPtr->numCol + 
+                                ((r == 0) ? RF_MAXSPARE : 0), 
+                               sizeof(RF_DiskQueue_t), (RF_DiskQueue_t *), 
+                               raidPtr->cleanupList);
                if (diskQueues[r] == NULL)
                        return (ENOMEM);
                for (c = 0; c < raidPtr->numCol; c++) {



Home | Main Index | Thread Index | Old Index