| fprint(2, "usage: syncindex [-fv] [-B blockcachesize] config\n"); |
| threadmain(int argc, char *argv[]) |
| bcmem = unittoull(ARGF()); |
| if(initventi(argv[0]) < 0) |
| sysfatal("can't init venti: %r"); |
| if(bcmem < maxblocksize * (mainindex->narenas + mainindex->nsects * 4 + 16)) |
| bcmem = maxblocksize * (mainindex->narenas + mainindex->nsects * 4 + 16); |
| fprint(2, "initialize %d bytes of disk block cache\n", bcmem); |
| printindex(2, mainindex); |
| if(syncindex(mainindex, fix) < 0) |
| sysfatal("failed to sync index=%s: %r\n", mainindex->name); |