venti: add bootstrap mode (write + no index)
R=rsc, rsc http://codereview.appspot.com/6097047
This commit is contained in:
parent
a2df31f46d
commit
e7e953b3da
4 changed files with 9 additions and 0 deletions
|
|
@ -740,6 +740,7 @@ extern Stats stats;
|
|||
extern u8int zeroscore[VtScoreSize];
|
||||
extern int compressblocks;
|
||||
extern int writestodevnull; /* dangerous - for performance debugging */
|
||||
extern int bootstrap; /* writes but does not index - cannot read */
|
||||
extern int collectstats;
|
||||
extern QLock memdrawlock;
|
||||
extern int icachesleeptime;
|
||||
|
|
|
|||
|
|
@ -396,6 +396,7 @@ static struct
|
|||
"ignorebloom", &ignorebloom,
|
||||
"syncwrites", &syncwrites,
|
||||
"icacheprefetch", &icacheprefetch,
|
||||
"bootstrap", &bootstrap,
|
||||
0
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
#include "dat.h"
|
||||
#include "fns.h"
|
||||
|
||||
int bootstrap = 0;
|
||||
int syncwrites = 0;
|
||||
int queuewrites = 0;
|
||||
int writestodevnull = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue