aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/venti/srv/dcache.c
diff options
context:
space:
mode:
authorRuss Cox <rsc@swtch.com>2007-10-29 14:33:17 -0400
committerRuss Cox <rsc@swtch.com>2007-10-29 14:33:17 -0400
commit45ac814c8609174199cadb6f1bbb4baf7c12c94a (patch)
tree49f4b2120a36b080a0ffe8f9988c21db7b97656c /src/cmd/venti/srv/dcache.c
parentc5a183de108e5685305734d5cf984b58bb0d614a (diff)
downloadplan9port-45ac814c8609174199cadb6f1bbb4baf7c12c94a.tar.gz
plan9port-45ac814c8609174199cadb6f1bbb4baf7c12c94a.tar.bz2
plan9port-45ac814c8609174199cadb6f1bbb4baf7c12c94a.zip
venti: fix sync deadlock, add /proc stub
Diffstat (limited to 'src/cmd/venti/srv/dcache.c')
-rw-r--r--src/cmd/venti/srv/dcache.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/src/cmd/venti/srv/dcache.c b/src/cmd/venti/srv/dcache.c
index f0cb5318..abbd26a4 100644
--- a/src/cmd/venti/srv/dcache.c
+++ b/src/cmd/venti/srv/dcache.c
@@ -55,9 +55,6 @@ struct DCache
u8int *mem; /* memory for all block descriptors */
int ndirty; /* number of dirty blocks */
int maxdirty; /* max. number of dirty blocks */
-
- AState diskstate;
- AState state;
};
typedef struct Ra Ra;
@@ -123,26 +120,6 @@ initdcache(u32int mem)
vtproc(delaykickroundproc, &dcache.round);
}
-void
-setdcachestate(AState *a)
-{
- trace(TraceBlock, "setdcachestate %s 0x%llux clumps %d", a->arena ? a->arena->name : nil, a->aa, a->stats.clumps);
- qlock(&dcache.lock);
- dcache.state = *a;
- qunlock(&dcache.lock);
-}
-
-AState
-diskstate(void)
-{
- AState a;
-
- qlock(&dcache.lock);
- a = dcache.diskstate;
- qunlock(&dcache.lock);
- return a;
-}
-
static u32int
pbhash(u64int addr)
{
@@ -637,7 +614,6 @@ flushproc(void *v)
int i, j, n;
ulong t0;
DBlock *b, **write;
- AState as;
USED(v);
threadsetname("flushproc");
@@ -648,10 +624,6 @@ flushproc(void *v)
t0 = nsec()/1000;
trace(TraceProc, "build t=%lud", (ulong)(nsec()/1000)-t0);
- qlock(&dcache.lock);
- as = dcache.state;
- qunlock(&dcache.lock);
-
write = dcache.write;
n = 0;
for(i=0; i<dcache.nblocks; i++){
@@ -688,7 +660,6 @@ flushproc(void *v)
*/
trace(TraceProc, "undirty.%d t=%lud", j, (ulong)(nsec()/1000)-t0);
qlock(&dcache.lock);
- dcache.diskstate = as;
for(i=0; i<n; i++){
b = write[i];
--dcache.ndirty;