From e7e953b3dadb5aba3bb2f3f05b2beff94934a4dc Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Sun, 22 Apr 2012 15:27:06 -0400 Subject: venti: add bootstrap mode (write + no index) R=rsc, rsc http://codereview.appspot.com/6097047 --- src/cmd/venti/srv/icache.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/cmd/venti/srv/icache.c') diff --git a/src/cmd/venti/srv/icache.c b/src/cmd/venti/srv/icache.c index af76819f..3055b981 100644 --- a/src/cmd/venti/srv/icache.c +++ b/src/cmd/venti/srv/icache.c @@ -387,6 +387,9 @@ icachelookup(u8int score[VtScoreSize], int type, IAddr *ia) { IEntry *ie; + if(bootstrap) + return -1; + qlock(&icache.lock); addstat(StatIcacheLookup, 1); if((ie = ihashlookup(icache.hash, score, type)) != nil){ @@ -417,6 +420,9 @@ insertscore(u8int score[VtScoreSize], IAddr *ia, int state, AState *as) { ISum *toload; + if(bootstrap) + return -1; + qlock(&icache.lock); icacheinsert(score, ia, state); if(state == IEClean) -- cgit v1.2.3