summaryrefslogtreecommitdiff
path: root/sys/dev/raidframe
diff options
context:
space:
mode:
authoroster <oster@NetBSD.org>2004-01-01 23:35:08 +0000
committeroster <oster@NetBSD.org>2004-01-01 23:35:08 +0000
commit5b70d1d9792c80e14a043f2316462edaaa80b81b (patch)
tree5e07fa3a24076c73f2701bdac97f9e3e3723de3d /sys/dev/raidframe
parent996e659ce67cee02f7572c23da5dcb0651d39dc6 (diff)
Cleanup some unused desc->flags:
RF_DAG_RETURN_DAG RF_DAG_RETURN_ASM RF_DAG_TEST_ACCESS and the code that goes with them. A couple more of these can probably go too, but I might need them in a bit.
Diffstat (limited to 'sys/dev/raidframe')
-rw-r--r--sys/dev/raidframe/rf_dagflags.h9
-rw-r--r--sys/dev/raidframe/rf_states.c30
2 files changed, 7 insertions, 32 deletions
diff --git a/sys/dev/raidframe/rf_dagflags.h b/sys/dev/raidframe/rf_dagflags.h
index 68e39ddeee9..f6d9b93c8ed 100644
--- a/sys/dev/raidframe/rf_dagflags.h
+++ b/sys/dev/raidframe/rf_dagflags.h
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_dagflags.h,v 1.3 1999/02/05 00:06:08 oster Exp $ */
+/* $NetBSD: rf_dagflags.h,v 1.4 2004/01/01 23:35:08 oster Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@@ -50,18 +50,11 @@
#define RF_DAG_FLAGS_NONE 0 /* no flags */
#define RF_DAG_SUPPRESS_LOCKS (1<<0) /* supress all stripe locks in
* the DAG */
-#define RF_DAG_RETURN_ASM (1<<1) /* create an ASM and return it
- * instead of freeing it */
-#define RF_DAG_RETURN_DAG (1<<2) /* create a DAG and return it
- * instead of freeing it */
#define RF_DAG_NONBLOCKING_IO (1<<3) /* cause DoAccess to be
* non-blocking */
#define RF_DAG_ACCESS_COMPLETE (1<<4) /* the access is complete */
#define RF_DAG_DISPATCH_RETURNED (1<<5) /* used to handle the case
* where the dag invokes no
* I/O */
-#define RF_DAG_TEST_ACCESS (1<<6) /* this access came through
- * rf_ioctl instead of
- * rf_strategy */
#endif /* !_RF__RF_DAGFLAGS_H_ */
diff --git a/sys/dev/raidframe/rf_states.c b/sys/dev/raidframe/rf_states.c
index 24bfa824076..2792995fbad 100644
--- a/sys/dev/raidframe/rf_states.c
+++ b/sys/dev/raidframe/rf_states.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_states.c,v 1.23 2003/12/31 17:47:53 oster Exp $ */
+/* $NetBSD: rf_states.c,v 1.24 2004/01/01 23:35:08 oster Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rf_states.c,v 1.23 2003/12/31 17:47:53 oster Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_states.c,v 1.24 2004/01/01 23:35:08 oster Exp $");
#include <sys/errno.h>
@@ -587,7 +587,6 @@ rf_State_Cleanup(RF_RaidAccessDesc_t *desc)
RF_AccessStripeMapHeader_t *asmh = desc->asmap;
RF_Raid_t *raidPtr = desc->raidPtr;
RF_AccessStripeMap_t *asm_p;
- RF_DagHeader_t *dag_h;
RF_Etimer_t timer;
int i;
@@ -602,24 +601,10 @@ rf_State_Cleanup(RF_RaidAccessDesc_t *desc)
tracerec->specific.user.dag_retry_us = 0;
RF_ETIMER_START(timer);
- if (desc->flags & RF_DAG_RETURN_DAG) {
- /* copy dags into paramDAG */
- *(desc->paramDAG) = desc->dagArray[0].dags;
- dag_h = *(desc->paramDAG);
- for (i = 1; i < desc->numStripes; i++) {
- /* concatenate dags from remaining stripes */
- RF_ASSERT(dag_h);
- while (dag_h->next)
- dag_h = dag_h->next;
- dag_h->next = desc->dagArray[i].dags;
- }
- } else {
- /* free all dags */
- for (i = 0; i < desc->numStripes; i++) {
- rf_FreeDAG(desc->dagArray[i].dags);
- }
+ /* free all dags */
+ for (i = 0; i < desc->numStripes; i++) {
+ rf_FreeDAG(desc->dagArray[i].dags);
}
-
RF_ETIMER_STOP(timer);
RF_ETIMER_EVAL(timer);
tracerec->specific.user.cleanup_us = RF_ETIMER_VAL_US(timer);
@@ -645,10 +630,7 @@ rf_State_Cleanup(RF_RaidAccessDesc_t *desc)
tracerec->specific.user.lock_us += RF_ETIMER_VAL_US(timer);
RF_ETIMER_START(timer);
- if (desc->flags & RF_DAG_RETURN_ASM)
- *(desc->paramASM) = asmh;
- else
- rf_FreeAccessStripeMap(asmh);
+ rf_FreeAccessStripeMap(asmh);
RF_ETIMER_STOP(timer);
RF_ETIMER_EVAL(timer);
tracerec->specific.user.cleanup_us += RF_ETIMER_VAL_US(timer);