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.
This commit is contained in:
oster 1999-06-04 01:51:00 +00:00
parent 3af0ce9e19
commit 60769ea563
1 changed files with 11 additions and 3 deletions

View File

@ -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 @@ clean_dqd(dqd)
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 @@ rf_ConfigureDiskQueues(
}
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++) {