Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/raidframe rf_ReleaseBufferWaiter(s) were not being u...



details:   https://anonhg.NetBSD.org/src/rev/43ab994da44c
branches:  trunk
changeset: 536727:43ab994da44c
user:      oster <oster%NetBSD.org@localhost>
date:      Sat Sep 21 01:21:19 2002 +0000

description:
rf_ReleaseBufferWaiter(s) were not being used!  Thanks Krister!

diffstat:

 sys/dev/raidframe/rf_reconbuffer.c |  55 +------------------------------------
 sys/dev/raidframe/rf_reconbuffer.h |   6 +---
 2 files changed, 3 insertions(+), 58 deletions(-)

diffs (92 lines):

diff -r 0261be3ceb0e -r 43ab994da44c sys/dev/raidframe/rf_reconbuffer.c
--- a/sys/dev/raidframe/rf_reconbuffer.c        Sat Sep 21 01:18:45 2002 +0000
+++ b/sys/dev/raidframe/rf_reconbuffer.c        Sat Sep 21 01:21:19 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rf_reconbuffer.c,v 1.8 2002/09/11 02:22:49 oster Exp $ */
+/*     $NetBSD: rf_reconbuffer.c,v 1.9 2002/09/21 01:21:19 oster Exp $ */
 /*
  * Copyright (c) 1995 Carnegie-Mellon University.
  * All rights reserved.
@@ -33,7 +33,7 @@
  ***************************************************/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rf_reconbuffer.c,v 1.8 2002/09/11 02:22:49 oster Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_reconbuffer.c,v 1.9 2002/09/21 01:21:19 oster Exp $");
 
 #include "rf_raid.h"
 #include "rf_reconbuffer.h"
@@ -424,54 +424,3 @@
                rcPtr->floatingRbufs = rbuf;
        }
 }
-/* release any disk that is waiting on a buffer for the indicated RU.
- * assumes the rb_mutex is LOCKED at entry
- */
-void 
-rf_ReleaseBufferWaiters(raidPtr, pssPtr)
-       RF_Raid_t *raidPtr;
-       RF_ReconParityStripeStatus_t *pssPtr;
-{
-       RF_CallbackDesc_t *cb1, *cb = pssPtr->bufWaitList;
-
-       Dprintf2("RECON: releasing buf waiters for psid %ld ru %d\n",
-           (long) pssPtr->parityStripeID, pssPtr->which_ru);
-       pssPtr->flags &= ~RF_PSS_BUFFERWAIT;
-       while (cb) {
-               cb1 = cb->next;
-               cb->next = NULL;
-               rf_CauseReconEvent(raidPtr, cb->row, cb->col, (void *) 0, RF_REVENT_BUFCLEAR);  /* arg==0 => we haven't
-                                                                                                * committed a buffer */
-               rf_FreeCallbackDesc(cb);
-               cb = cb1;
-       }
-       pssPtr->bufWaitList = NULL;
-}
-/* when reconstruction is forced on an RU, there may be some disks waiting to
- * acquire a buffer for that RU.  Since we allocate a new buffer as part of
- * the forced-reconstruction process, we no longer have to wait for any
- * buffers, so we wakeup any waiter that we find in the bufferWaitList
- *
- * assumes the rb_mutex is LOCKED at entry
- */
-void 
-rf_ReleaseBufferWaiter(rcPtr, rbuf)
-       RF_ReconCtrl_t *rcPtr;
-       RF_ReconBuffer_t *rbuf;
-{
-       RF_CallbackDesc_t *cb, *cbt;
-
-       for (cbt = NULL, cb = rcPtr->bufferWaitList; cb; cbt = cb, cb = cb->next) {
-               if ((cb->callbackArg.v == rbuf->parityStripeID) && (cb->callbackArg2.v == rbuf->which_ru)) {
-                       Dprintf2("RECON: Dropping row %d col %d from buffer wait list\n", cb->row, cb->col);
-                       if (cbt)
-                               cbt->next = cb->next;
-                       else
-                               rcPtr->bufferWaitList = cb->next;
-                       rf_CauseReconEvent((RF_Raid_t *) rbuf->raidPtr, cb->row, cb->col, (void *) 0, RF_REVENT_BUFREADY);      /* arg==0 => no
-                                                                                                                                * committed buffer */
-                       rf_FreeCallbackDesc(cb);
-                       return;
-               }
-       }
-}
diff -r 0261be3ceb0e -r 43ab994da44c sys/dev/raidframe/rf_reconbuffer.h
--- a/sys/dev/raidframe/rf_reconbuffer.h        Sat Sep 21 01:18:45 2002 +0000
+++ b/sys/dev/raidframe/rf_reconbuffer.h        Sat Sep 21 01:21:19 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rf_reconbuffer.h,v 1.4 2001/10/04 15:58:55 oster Exp $ */
+/*     $NetBSD: rf_reconbuffer.h,v 1.5 2002/09/21 01:21:19 oster Exp $ */
 /*
  * Copyright (c) 1995 Carnegie-Mellon University.
  * All rights reserved.
@@ -55,9 +55,5 @@
 void 
 rf_ReleaseFloatingReconBuffer(RF_Raid_t * raidPtr, RF_RowCol_t row,
     RF_ReconBuffer_t * rbuf);
-void 
-rf_ReleaseBufferWaiters(RF_Raid_t * raidPtr,
-    RF_ReconParityStripeStatus_t * pssPtr);
-void    rf_ReleaseBufferWaiter(RF_ReconCtrl_t * rcPtr, RF_ReconBuffer_t * rbuf);
 
 #endif                         /* !_RF__RF_RECONBUFFER_H_ */



Home | Main Index | Thread Index | Old Index