Nuke stuff dealing with the experimental memChunk code. It's unused, and
currently only contributing to bloat.
This commit is contained in:
parent
346b4189a5
commit
fcc4232f71
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: rf_dag.h,v 1.4 2001/10/04 15:58:51 oster Exp $ */
|
||||
/* $NetBSD: rf_dag.h,v 1.5 2002/08/02 03:32:56 oster Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1995 Carnegie-Mellon University.
|
||||
* All rights reserved.
|
||||
@ -152,8 +152,6 @@ typedef enum RF_DagStatus_e {
|
||||
} RF_DagStatus_t;
|
||||
#define RF_MAX_HDR_SUCC 1
|
||||
|
||||
#define RF_MAXCHUNKS 10
|
||||
|
||||
struct RF_DagHeader_s {
|
||||
RF_DagStatus_t status; /* status of this DAG */
|
||||
int numSuccedents; /* DAG may be a tree, i.e. may have > 1 root */
|
||||
@ -180,19 +178,6 @@ struct RF_DagHeader_s {
|
||||
* is for */
|
||||
void *bp; /* the bp for this I/O passed down from the
|
||||
* file system. ignored outside kernel */
|
||||
|
||||
RF_ChunkDesc_t *memChunk[RF_MAXCHUNKS]; /* experimental- Chunks of
|
||||
* memory to be retained upon
|
||||
* DAG free for re-use */
|
||||
int chunkIndex; /* the idea is to avoid calls to alloc and
|
||||
* free */
|
||||
|
||||
RF_ChunkDesc_t **xtraMemChunk; /* escape hatch which allows
|
||||
* SelectAlgorithm to merge memChunks
|
||||
* from several dags */
|
||||
int xtraChunkIndex; /* number of ptrs to valid chunks */
|
||||
int xtraChunkCnt; /* number of ptrs to chunks allocated */
|
||||
|
||||
};
|
||||
|
||||
struct RF_DagList_s {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: rf_dagutils.c,v 1.13 2002/07/13 20:14:34 oster Exp $ */
|
||||
/* $NetBSD: rf_dagutils.c,v 1.14 2002/08/02 03:32:56 oster Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1995 Carnegie-Mellon University.
|
||||
* All rights reserved.
|
||||
@ -33,7 +33,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: rf_dagutils.c,v 1.13 2002/07/13 20:14:34 oster Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: rf_dagutils.c,v 1.14 2002/08/02 03:32:56 oster Exp $");
|
||||
|
||||
#include <dev/raidframe/raidframevar.h>
|
||||
|
||||
@ -160,27 +160,9 @@ rf_FreeDAG(dag_h)
|
||||
{
|
||||
RF_AccessStripeMapHeader_t *asmap, *t_asmap;
|
||||
RF_DagHeader_t *nextDag;
|
||||
int i;
|
||||
|
||||
while (dag_h) {
|
||||
nextDag = dag_h->next;
|
||||
for (i = 0; dag_h->memChunk[i] && i < RF_MAXCHUNKS; i++) {
|
||||
/* release mem chunks */
|
||||
rf_ReleaseMemChunk(dag_h->memChunk[i]);
|
||||
dag_h->memChunk[i] = NULL;
|
||||
}
|
||||
|
||||
RF_ASSERT(i == dag_h->chunkIndex);
|
||||
if (dag_h->xtraChunkCnt > 0) {
|
||||
/* free xtraMemChunks */
|
||||
for (i = 0; dag_h->xtraMemChunk[i] && i < dag_h->xtraChunkIndex; i++) {
|
||||
rf_ReleaseMemChunk(dag_h->xtraMemChunk[i]);
|
||||
dag_h->xtraMemChunk[i] = NULL;
|
||||
}
|
||||
RF_ASSERT(i == dag_h->xtraChunkIndex);
|
||||
/* free ptrs to xtraMemChunks */
|
||||
RF_Free(dag_h->xtraMemChunk, dag_h->xtraChunkCnt * sizeof(RF_ChunkDesc_t *));
|
||||
}
|
||||
rf_FreeAllocList(dag_h->allocList);
|
||||
for (asmap = dag_h->asmList; asmap;) {
|
||||
t_asmap = asmap;
|
||||
|
Loading…
Reference in New Issue
Block a user