diff options
| author | oster <oster@NetBSD.org> | 2004-03-03 00:45:20 +0000 |
|---|---|---|
| committer | oster <oster@NetBSD.org> | 2004-03-03 00:45:20 +0000 |
| commit | b3eae139ebdb18e085ce4d8df8a08940836f75f3 (patch) | |
| tree | 05b21e0fb72ca14b88a5414dca15244b89b6cd49 /sys/dev/raidframe/rf_raid1.c | |
| parent | 65e1a3b11271a2d8bdfd3b6969afb554dfe660d8 (diff) | |
- cleanup memory allocation in rf_AllocPSStatus()
- change function signature of rf_LookupRUStatus(). The last argument
is now a pointer to a new PSS, in case one is needed. Rather than
having rf_LookupRUStatus() allocate a new PSS, we pre-allocate one
beforehand, where necessary, just in case.
- change callers of rf_lookupRUStatus() to deal with the new way of
calling rf_lookupRUStatus().
[no improvement or worsening of parity rebuild/initialization performance.]
Diffstat (limited to 'sys/dev/raidframe/rf_raid1.c')
| -rw-r--r-- | sys/dev/raidframe/rf_raid1.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/dev/raidframe/rf_raid1.c b/sys/dev/raidframe/rf_raid1.c index fe48d1b9cf5..cab6c63047e 100644 --- a/sys/dev/raidframe/rf_raid1.c +++ b/sys/dev/raidframe/rf_raid1.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_raid1.c,v 1.20 2004/03/02 15:47:35 oster Exp $ */ +/* $NetBSD: rf_raid1.c,v 1.21 2004/03/03 00:45:20 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -33,7 +33,7 @@ *****************************************************************************/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_raid1.c,v 1.20 2004/03/02 15:47:35 oster Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_raid1.c,v 1.21 2004/03/03 00:45:20 oster Exp $"); #include "rf_raid.h" #include "rf_raid1.h" @@ -543,14 +543,13 @@ rf_SubmitReconBufferRAID1(RF_ReconBuffer_t *rbuf, int keep_it, { RF_ReconParityStripeStatus_t *pssPtr; RF_ReconCtrl_t *reconCtrlPtr; - int retcode, created; + int retcode; RF_CallbackDesc_t *cb, *p; RF_ReconBuffer_t *t; RF_Raid_t *raidPtr; caddr_t ta; retcode = 0; - created = 0; raidPtr = rbuf->raidPtr; reconCtrlPtr = raidPtr->reconControl; @@ -579,7 +578,7 @@ rf_SubmitReconBufferRAID1(RF_ReconBuffer_t *rbuf, int keep_it, RF_LOCK_MUTEX(reconCtrlPtr->rb_mutex); pssPtr = rf_LookupRUStatus(raidPtr, reconCtrlPtr->pssTable, - rbuf->parityStripeID, rbuf->which_ru, RF_PSS_NONE, &created); + rbuf->parityStripeID, rbuf->which_ru, RF_PSS_NONE, NULL); RF_ASSERT(pssPtr); /* if it didn't exist, we wouldn't have gotten * an rbuf for it */ |
