Source-Changes-HG archive

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

[src/netbsd-1-4]: src/sys/dev/raidframe Pull up revisions 1.8-1.10 (requested...



details:   https://anonhg.NetBSD.org/src/rev/b9175f0ca912
branches:  netbsd-1-4
changeset: 469901:b9175f0ca912
user:      he <he%NetBSD.org@localhost>
date:      Mon Dec 20 13:38:07 1999 +0000

description:
Pull up revisions 1.8-1.10 (requested by oster):
  Re-work the IO throttle code.  Fixes potential panics under high
  loads under FFS.

diffstat:

 sys/dev/raidframe/rf_states.c |  56 ++++++++++++++++--------------------------
 1 files changed, 21 insertions(+), 35 deletions(-)

diffs (86 lines):

diff -r f36ed83d260c -r b9175f0ca912 sys/dev/raidframe/rf_states.c
--- a/sys/dev/raidframe/rf_states.c     Mon Dec 20 13:32:43 1999 +0000
+++ b/sys/dev/raidframe/rf_states.c     Mon Dec 20 13:38:07 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rf_states.c,v 1.6.2.1 1999/09/26 02:14:27 cgd Exp $    */
+/*     $NetBSD: rf_states.c,v 1.6.2.2 1999/12/20 13:38:07 he Exp $     */
 /*
  * Copyright (c) 1995 Carnegie-Mellon University.
  * All rights reserved.
@@ -42,14 +42,7 @@
 #include "rf_engine.h"
 #include "rf_map.h"
 #include "rf_etimer.h"
-
-#if defined(KERNEL) && (DKUSAGE > 0)
-#include <sys/dkusage.h>
-#include <io/common/iotypes.h>
-#include <io/cam/dec_cam.h>
-#include <io/cam/cam.h>
-#include <io/cam/pdrv.h>
-#endif                         /* KERNEL && DKUSAGE > 0 */
+#include "rf_kintf.h"
 
 /* prototypes for some of the available states.
 
@@ -195,7 +188,6 @@
        rf_ContinueRaidAccess(desc);
 }
 
-
 int 
 rf_State_LastState(RF_RaidAccessDesc_t * desc)
 {
@@ -203,33 +195,27 @@
        RF_CBParam_t callbackArg;
 
        callbackArg.p = desc->callbackArg;
-
-       if (!(desc->flags & RF_DAG_TEST_ACCESS)) {      /* don't biodone if this */
-#if DKUSAGE > 0
-               RF_DKU_END_IO(((RF_Raid_t *) desc->raidPtr)->raidid, (struct buf *) desc->bp);
-#else
-               RF_DKU_END_IO(((RF_Raid_t *) desc->raidPtr)->raidid);
-#endif                         /* DKUSAGE > 0 */
-
-               /*
-                * If this is not an async request, wake up the caller
-                */
-               if (desc->async_flag == 0)
-                       wakeup(desc->bp);
+       
+       /*
+        * If this is not an async request, wake up the caller
+        */
+       if (desc->async_flag == 0)
+               wakeup(desc->bp);
+       
+       /* 
+        * Wakeup any requests waiting to go.
+        */
+       
+       RF_LOCK_MUTEX(((RF_Raid_t *) desc->raidPtr)->mutex);
+       ((RF_Raid_t *) desc->raidPtr)->openings++;
+       RF_UNLOCK_MUTEX(((RF_Raid_t *) desc->raidPtr)->mutex);
 
-               /* 
-                * Wakeup any requests waiting to go.
-                */
+       /* wake up any pending IO */
+       raidstart(((RF_Raid_t *) desc->raidPtr));
+               
+       /* printf("Calling biodone on 0x%x\n",desc->bp); */
+       biodone(desc->bp);      /* access came through ioctl */
 
-               RF_LOCK_MUTEX(((RF_Raid_t *) desc->raidPtr)->mutex);
-               ((RF_Raid_t *) desc->raidPtr)->openings++;
-               wakeup(&(((RF_Raid_t *) desc->raidPtr)->openings));
-               RF_UNLOCK_MUTEX(((RF_Raid_t *) desc->raidPtr)->mutex);
-
-
-               /* printf("Calling biodone on 0x%x\n",desc->bp); */
-               biodone(desc->bp);      /* access came through ioctl */
-       }
        if (callbackFunc)
                callbackFunc(callbackArg);
        rf_FreeRaidAccDesc(desc);



Home | Main Index | Thread Index | Old Index