aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/venti/srv/icache.c
diff options
context:
space:
mode:
authorRuss Cox <rsc@swtch.com>2012-04-22 15:27:06 -0400
committerRuss Cox <rsc@swtch.com>2012-04-22 15:27:06 -0400
commite7e953b3dadb5aba3bb2f3f05b2beff94934a4dc (patch)
treef5d3c1283de79bcaa3fd546816a68574d3738de0 /src/cmd/venti/srv/icache.c
parenta2df31f46d2119bf79d5b0e0fba07cef4564abcc (diff)
downloadplan9port-e7e953b3dadb5aba3bb2f3f05b2beff94934a4dc.tar.gz
plan9port-e7e953b3dadb5aba3bb2f3f05b2beff94934a4dc.tar.bz2
plan9port-e7e953b3dadb5aba3bb2f3f05b2beff94934a4dc.zip
venti: add bootstrap mode (write + no index)
R=rsc, rsc http://codereview.appspot.com/6097047
Diffstat (limited to 'src/cmd/venti/srv/icache.c')
-rw-r--r--src/cmd/venti/srv/icache.c6
1 files changed, 6 insertions, 0 deletions
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)