diff options
| author | Russ Cox <rsc@swtch.com> | 2007-10-29 14:33:17 -0400 |
|---|---|---|
| committer | Russ Cox <rsc@swtch.com> | 2007-10-29 14:33:17 -0400 |
| commit | 45ac814c8609174199cadb6f1bbb4baf7c12c94a (patch) | |
| tree | 49f4b2120a36b080a0ffe8f9988c21db7b97656c /src/cmd/venti/srv/syncindex.c | |
| parent | c5a183de108e5685305734d5cf984b58bb0d614a (diff) | |
| download | plan9port-45ac814c8609174199cadb6f1bbb4baf7c12c94a.tar.gz plan9port-45ac814c8609174199cadb6f1bbb4baf7c12c94a.zip | |
venti: fix sync deadlock, add /proc stub
Diffstat (limited to 'src/cmd/venti/srv/syncindex.c')
| -rw-r--r-- | src/cmd/venti/srv/syncindex.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/cmd/venti/srv/syncindex.c b/src/cmd/venti/srv/syncindex.c index fb3c4ce2..8f521558 100644 --- a/src/cmd/venti/srv/syncindex.c +++ b/src/cmd/venti/srv/syncindex.c @@ -6,7 +6,7 @@ static int verbose; void usage(void) { - fprint(2, "usage: syncindex [-fv] [-B blockcachesize] config\n"); + fprint(2, "usage: syncindex [-v] [-B blockcachesize] config\n"); threadexitsall("usage"); } @@ -16,9 +16,7 @@ void threadmain(int argc, char *argv[]) { u32int bcmem, icmem; - int fix; - fix = 0; bcmem = 0; icmem = 0; ARGBEGIN{ @@ -28,9 +26,6 @@ threadmain(int argc, char *argv[]) case 'I': icmem = unittoull(EARGF(usage())); break; - case 'f': - fix++; - break; case 'v': verbose++; break; @@ -39,9 +34,6 @@ threadmain(int argc, char *argv[]) break; }ARGEND - if(!fix) - readonly = 1; - if(argc != 1) usage(); @@ -63,8 +55,10 @@ threadmain(int argc, char *argv[]) if(verbose) printindex(2, mainindex); - if(syncindex(mainindex, fix, 1, 0) < 0) + if(syncindex(mainindex) < 0) sysfatal("failed to sync index=%s: %r\n", mainindex->name); + flushicache(); + flushdcache(); threadexitsall(0); } |
