Browse Source

Plan 9 from Bell Labs 2007-09-06

David du Colombier 14 years ago
parent
commit
6db58b0c9b
100 changed files with 17372 additions and 7330 deletions
  1. 206 97
      dist/replica/_plan9.db
  2. 204 99
      dist/replica/plan9.db
  3. 275 0
      dist/replica/plan9.log
  4. 271 0
      sys/include/oventi.h
  5. 457 232
      sys/include/venti.h
  6. 158 0
      sys/man/1/venti
  7. 246 0
      sys/man/2/venti-cache
  8. 190 0
      sys/man/2/venti-client
  9. 200 0
      sys/man/2/venti-conn
  10. 275 0
      sys/man/2/venti-fcall
  11. 325 0
      sys/man/2/venti-file
  12. 136 0
      sys/man/2/venti-log
  13. 66 0
      sys/man/2/venti-mem
  14. 281 0
      sys/man/2/venti-packet
  15. 122 0
      sys/man/2/venti-server
  16. 56 0
      sys/man/2/venti-zero
  17. 3 0
      sys/man/4/cwfs
  18. 451 0
      sys/man/6/venti
  19. 426 164
      sys/man/8/venti
  20. 106 0
      sys/man/8/venti-backup
  21. 404 0
      sys/man/8/venti-fmt
  22. 0 507
      sys/man/8/ventiaux
  23. 3 6
      sys/src/cmd/aquarela/nblistener.c
  24. 10 3
      sys/src/cmd/cwfs/main.c
  25. 1 1
      sys/src/cmd/fossil/mkfile
  26. 1 1
      sys/src/cmd/fossil/stdinc.h
  27. 1 0
      sys/src/cmd/oventi/README
  28. 0 0
      sys/src/cmd/oventi/backup.example
  29. 0 0
      sys/src/cmd/oventi/conf.rc
  30. 193 0
      sys/src/cmd/oventi/copy.c
  31. 0 0
      sys/src/cmd/oventi/dat.h
  32. 0 0
      sys/src/cmd/oventi/dumpvacroots
  33. 0 0
      sys/src/cmd/oventi/fns.h
  34. 20 0
      sys/src/cmd/oventi/mkfile
  35. 0 0
      sys/src/cmd/oventi/notes
  36. 1 1
      sys/src/cmd/oventi/stdinc.h
  37. 0 0
      sys/src/cmd/oventi/venti.conf
  38. 0 0
      sys/src/cmd/oventi/wrtape
  39. 1 0
      sys/src/cmd/vac/cache.c
  40. 3 1
      sys/src/cmd/vac/fs.c
  41. 1 1
      sys/src/cmd/vac/mkfile
  42. 1 1
      sys/src/cmd/vac/stdinc.h
  43. 0 649
      sys/src/cmd/venti/arena.c
  44. 0 404
      sys/src/cmd/venti/arenas.c
  45. 0 147
      sys/src/cmd/venti/buildindex.c
  46. 0 122
      sys/src/cmd/venti/checkarenas.c
  47. 0 189
      sys/src/cmd/venti/checkindex.c
  48. 0 197
      sys/src/cmd/venti/clump.c
  49. 0 471
      sys/src/cmd/venti/conv.c
  50. 165 95
      sys/src/cmd/venti/copy.c
  51. 0 373
      sys/src/cmd/venti/dcache.c
  52. 79 0
      sys/src/cmd/venti/devnull.c
  53. 0 365
      sys/src/cmd/venti/dumparena.c
  54. 0 137
      sys/src/cmd/venti/findscore.c
  55. 0 109
      sys/src/cmd/venti/fmtarenas.c
  56. 0 75
      sys/src/cmd/venti/fmtisect.c
  57. 0 438
      sys/src/cmd/venti/httpd.c
  58. 0 201
      sys/src/cmd/venti/icache.c
  59. 0 781
      sys/src/cmd/venti/index.c
  60. 0 205
      sys/src/cmd/venti/lump.c
  61. 0 382
      sys/src/cmd/venti/lumpcache.c
  62. 0 153
      sys/src/cmd/venti/lumpqueue.c
  63. 11 113
      sys/src/cmd/venti/mkfile
  64. 27 28
      sys/src/cmd/venti/mkroot.c
  65. 0 47
      sys/src/cmd/venti/mkxml
  66. 0 42
      sys/src/cmd/venti/mkxml.elems
  67. 0 128
      sys/src/cmd/venti/part.c
  68. 0 137
      sys/src/cmd/venti/printarena.c
  69. 335 0
      sys/src/cmd/venti/randtest.c
  70. 36 64
      sys/src/cmd/venti/read.c
  71. 112 0
      sys/src/cmd/venti/readlist.c
  72. 112 0
      sys/src/cmd/venti/ro.c
  73. 72 0
      sys/src/cmd/venti/root.c
  74. 756 0
      sys/src/cmd/venti/srv/arena.c
  75. 415 0
      sys/src/cmd/venti/srv/arenas.c
  76. 260 0
      sys/src/cmd/venti/srv/bloom.c
  77. 38 18
      sys/src/cmd/venti/srv/buildbuck.c
  78. 945 0
      sys/src/cmd/venti/srv/buildindex.c
  79. 137 0
      sys/src/cmd/venti/srv/checkarenas.c
  80. 295 0
      sys/src/cmd/venti/srv/checkindex.c
  81. 227 0
      sys/src/cmd/venti/srv/clump.c
  82. 29 33
      sys/src/cmd/venti/srv/clumpstats.c
  83. 249 0
      sys/src/cmd/venti/srv/cmparena.c
  84. 317 0
      sys/src/cmd/venti/srv/cmparenas.c
  85. 96 69
      sys/src/cmd/venti/srv/config.c
  86. 698 0
      sys/src/cmd/venti/srv/conv.c
  87. 731 0
      sys/src/cmd/venti/srv/dat.h
  88. 862 0
      sys/src/cmd/venti/srv/dcache.c
  89. 88 0
      sys/src/cmd/venti/srv/disksched.c
  90. 13 13
      sys/src/cmd/venti/srv/dump.c
  91. 122 0
      sys/src/cmd/venti/srv/findscore.c
  92. 1911 0
      sys/src/cmd/venti/srv/fixarenas.c
  93. 1660 0
      sys/src/cmd/venti/srv/fixarenas0.c
  94. 132 0
      sys/src/cmd/venti/srv/fmtarenas.c
  95. 116 0
      sys/src/cmd/venti/srv/fmtbloom.c
  96. 31 31
      sys/src/cmd/venti/srv/fmtindex.c
  97. 83 0
      sys/src/cmd/venti/srv/fmtisect.c
  98. 225 0
      sys/src/cmd/venti/srv/fns.h
  99. 197 0
      sys/src/cmd/venti/srv/graph.c
  100. 696 0
      sys/src/cmd/venti/srv/hdisk.c

+ 206 - 97
dist/replica/_plan9.db

@@ -120,7 +120,7 @@
 386/bin/aux/ms2 - 775 sys sys 1188530147 88499
 386/bin/aux/msexceltables - 775 sys sys 1168402283 82921
 386/bin/aux/mswordstrings - 775 sys sys 1168402283 65541
-386/bin/aux/na - 775 sys sys 1168402284 154423
+386/bin/aux/na - 775 sys sys 1189023884 154372
 386/bin/aux/nfsmount - 775 sys sys 1184731233 233217
 386/bin/aux/nfsserver - 775 sys sys 1182223285 184719
 386/bin/aux/olefs - 775 sys sys 1179372075 148111
@@ -191,7 +191,7 @@
 386/bin/cpp - 775 sys sys 1188446882 149057
 386/bin/cpu - 775 sys sys 1188446885 139216
 386/bin/crop - 775 sys sys 1168402298 116374
-386/bin/cwfs - 775 sys sys 1188446894 365325
+386/bin/cwfs - 775 sys sys 1189033352 365605
 386/bin/date - 775 sys sys 1178568265 41845
 386/bin/db - 775 sys sys 1188499570 349188
 386/bin/dc - 775 sys sys 1168402299 99260
@@ -569,6 +569,7 @@
 386/lib/libmemlayer.a - 664 sys sys 1168402369 47360
 386/lib/libmp.a - 664 sys sys 1188447454 79978
 386/lib/libndb.a - 664 sys sys 1187061208 64470
+386/lib/liboventi.a - 664 sys sys 1188621781 99062
 386/lib/libplumb.a - 664 sys sys 1168402370 19408
 386/lib/libregexp.a - 664 sys sys 1181507273 37290
 386/lib/libscribble.a - 664 sys sys 1175972562 107238
@@ -576,7 +577,7 @@
 386/lib/libstdio.a - 664 sys sys 1176432133 126062
 386/lib/libsunrpc.a - 664 sys sys 1187061209 353148
 386/lib/libthread.a - 664 sys sys 1184731247 71918
-386/lib/libventi.a - 664 sys sys 1188447470 97858
+386/lib/libventi.a - 664 sys sys 1188621843 191156
 386/mbr - 775 sys sys 1131317338 407
 386/mkfile - 664 sys sys 948141303 46
 386/pbs - 775 sys sys 1143465402 495
@@ -6093,6 +6094,7 @@ sys/include/mouse.h - 664 sys sys 1035232010 1003
 sys/include/mp.h - 664 sys sys 1176499134 4803
 sys/include/ndb.h - 664 sys sys 1144174492 4412
 sys/include/nfs3.h - 664 sys sys 1045589438 15082
+sys/include/oventi.h - 664 sys sys 1188621731 7152
 sys/include/plumb.h - 664 sys sys 1014929065 989
 sys/include/pool.h - 664 sys sys 1102093074 1219
 sys/include/rdbg.h - 664 sys sys 1014929066 95
@@ -6104,7 +6106,7 @@ sys/include/sunrpc.h - 664 sys sys 1046367129 7219
 sys/include/thread.h - 664 sys sys 1184471649 3586
 sys/include/tos.h - 664 sys sys 1091904418 575
 sys/include/trace.h - 664 sys sys 1138460022 640
-sys/include/venti.h - 664 sys sys 1091904426 7150
+sys/include/venti.h - 664 sys sys 1188621741 9941
 sys/lib - 20000000775 sys sys 1105564897 0
 sys/lib/acid - 20000000775 sys sys 1114524607 0
 sys/lib/acid/386 - 664 sys sys 1168035402 3188
@@ -7476,6 +7478,7 @@ sys/man/1/uniq - 664 sys sys 944959674 995
 sys/man/1/units - 664 sys sys 1113743326 2046
 sys/man/1/uptime - 664 sys sys 1074733782 380
 sys/man/1/vac - 664 sys sys 1162102172 3244
+sys/man/1/venti - 664 sys sys 1188620038 2445
 sys/man/1/vi - 664 sys sys 1101668051 2904
 sys/man/1/vnc - 664 sys sys 1158063994 4313
 sys/man/1/vt - 664 sys sys 1186695303 2424
@@ -7630,6 +7633,16 @@ sys/man/2/symbol - 664 sys sys 950892874 9423
 sys/man/2/thread - 664 sys sys 1188841215 11916
 sys/man/2/time - 664 sys sys 1182980757 736
 sys/man/2/tmpfile - 664 sys sys 1048637161 1157
+sys/man/2/venti-cache - 664 sys sys 1188620038 5022
+sys/man/2/venti-client - 664 sys sys 1188620038 3339
+sys/man/2/venti-conn - 664 sys sys 1188620038 3600
+sys/man/2/venti-fcall - 664 sys sys 1188620038 4739
+sys/man/2/venti-file - 664 sys sys 1188620038 5840
+sys/man/2/venti-log - 664 sys sys 1188620038 2313
+sys/man/2/venti-mem - 664 sys sys 1188620038 1023
+sys/man/2/venti-packet - 664 sys sys 1188620038 4573
+sys/man/2/venti-server - 664 sys sys 1188620038 2201
+sys/man/2/venti-zero - 664 sys sys 1188620038 1064
 sys/man/2/wait - 664 sys sys 1163004064 2525
 sys/man/2/window - 664 sys sys 950593499 5522
 sys/man/3 - 20000000775 sys sys 1123100836 0
@@ -7680,7 +7693,7 @@ sys/man/4/archfs - 664 sys sys 960000712 533
 sys/man/4/cdfs - 664 sys sys 1026846913 3638
 sys/man/4/cfs - 664 sys sys 1172762903 1813
 sys/man/4/consolefs - 664 sys sys 1144424854 4245
-sys/man/4/cwfs - 664 sys sys 1178224996 6225
+sys/man/4/cwfs - 664 sys sys 1189029640 6255
 sys/man/4/dossrv - 664 sys sys 1168307403 4334
 sys/man/4/execnet - 664 sys sys 1019866708 1069
 sys/man/4/exportfs - 664 sys sys 1145881912 4655
@@ -7763,7 +7776,8 @@ sys/man/6/snap - 664 sys sys 1132452694 2402
 sys/man/6/thumbprint - 664 sys sys 1019866709 1124
 sys/man/6/users - 664 sys sys 1130912014 1392
 sys/man/6/utf - 664 sys sys 1146582112 2430
-sys/man/6/venti.conf - 664 sys sys 1164860945 1929
+sys/man/6/venti - 664 sys sys 1188620038 10695
+sys/man/6/venti.conf - 664 sys sys 1164860473 1929
 sys/man/6/vgadb - 664 sys sys 960256513 10972
 sys/man/7 - 20000000775 sys sys 1103794042 0
 sys/man/7/0intro - 664 sys sys 944959677 256
@@ -7842,8 +7856,9 @@ sys/man/8/tlssrv - 664 sys sys 1165623041 2589
 sys/man/8/trampoline - 664 sys sys 1126104844 1199
 sys/man/8/udpecho - 664 sys sys 954305553 303
 sys/man/8/update - 664 sys sys 961259288 2336
-sys/man/8/venti - 664 sys sys 1164860929 5434
-sys/man/8/ventiaux - 664 sys sys 1159419552 10571
+sys/man/8/venti - 664 sys sys 1188620038 12188
+sys/man/8/venti-backup - 664 sys sys 1188620038 2102
+sys/man/8/venti-fmt - 664 sys sys 1188620038 8626
 sys/man/8/vga - 664 sys sys 1141660952 3856
 sys/man/fonts - 664 sys sys 944959700 218
 sys/man/index.html - 664 sys sys 1019918444 1859
@@ -10071,7 +10086,7 @@ sys/src/cmd/cwfs/io.h - 664 sys sys 1174280312 866
 sys/src/cmd/cwfs/iobuf.c - 664 sys sys 1176500092 4722
 sys/src/cmd/cwfs/juke.c - 664 sys sys 1176500144 28859
 sys/src/cmd/cwfs/lrand.c - 664 sys sys 1171160167 1070
-sys/src/cmd/cwfs/main.c - 664 sys sys 1174799729 9976
+sys/src/cmd/cwfs/main.c - 664 sys sys 1189033288 10146
 sys/src/cmd/cwfs/malloc.c - 664 sys sys 1174281557 2360
 sys/src/cmd/cwfs/mkfile - 664 sys sys 1174941889 201
 sys/src/cmd/cwfs/mworm.c - 664 sys sys 1174370308 4311
@@ -10369,13 +10384,13 @@ sys/src/cmd/fossil/fs.h - 664 sys sys 1139667269 1581
 sys/src/cmd/fossil/history - 664 sys sys 1055703793 1400
 sys/src/cmd/fossil/invariants - 664 sys sys 1042005509 4073
 sys/src/cmd/fossil/last.c - 664 sys sys 1087005593 812
-sys/src/cmd/fossil/mkfile - 664 sys sys 1139667242 2640
+sys/src/cmd/fossil/mkfile - 664 sys sys 1189020178 2641
 sys/src/cmd/fossil/nobwatch.c - 664 sys sys 1042005509 329
 sys/src/cmd/fossil/pack.c - 664 sys sys 1187136436 4710
 sys/src/cmd/fossil/periodic.c - 664 sys sys 1061530726 1087
 sys/src/cmd/fossil/source.c - 664 sys sys 1187135867 20578
 sys/src/cmd/fossil/srcload.c - 664 sys sys 1042005510 4178
-sys/src/cmd/fossil/stdinc.h - 664 sys sys 1042005510 155
+sys/src/cmd/fossil/stdinc.h - 664 sys sys 1189020178 156
 sys/src/cmd/fossil/trunc.c - 664 sys sys 1042005511 280
 sys/src/cmd/fossil/unpack - 775 sys sys 1042005511 286
 sys/src/cmd/fossil/vac.c - 664 sys sys 1061530727 12483
@@ -12781,6 +12796,19 @@ sys/src/cmd/nfs.c - 664 sys sys 1050068720 31096
 sys/src/cmd/nm.c - 664 sys sys 1148106943 5322
 sys/src/cmd/nntpfs.c - 664 sys sys 1143695271 18860
 sys/src/cmd/ns.c - 664 sys sys 984717934 3558
+sys/src/cmd/oventi - 20000000775 sys sys 1189019154 0
+sys/src/cmd/oventi/README - 664 sys sys 1189018077 63
+sys/src/cmd/oventi/backup.example - 775 sys sys 1045503662 521
+sys/src/cmd/oventi/conf.rc - 775 sys sys 1055707446 1416
+sys/src/cmd/oventi/copy.c - 664 sys sys 1158618728 3713
+sys/src/cmd/oventi/dat.h - 664 sys sys 1128337707 15346
+sys/src/cmd/oventi/dumpvacroots - 775 sys sys 1163468045 571
+sys/src/cmd/oventi/fns.h - 664 sys sys 1055707422 6793
+sys/src/cmd/oventi/mkfile - 664 sys sys 1189018610 256
+sys/src/cmd/oventi/notes - 664 sys sys 1068500911 4032
+sys/src/cmd/oventi/stdinc.h - 664 sys sys 1188621931 140
+sys/src/cmd/oventi/venti.conf - 664 sys sys 1019867537 397
+sys/src/cmd/oventi/wrtape - 775 sys sys 1019678881 555
 sys/src/cmd/p.c - 664 sys sys 1121977162 1504
 sys/src/cmd/page - 20000000775 sys sys 1045606937 0
 sys/src/cmd/page/filter.c - 664 sys sys 1069793856 2166
@@ -14228,19 +14256,19 @@ sys/src/cmd/va/l.s - 664 sys sys 944961340 12696
 sys/src/cmd/va/lex.c - 664 sys sys 1143293804 12095
 sys/src/cmd/va/mkfile - 664 sys sys 944961340 215
 sys/src/cmd/vac - 20000000775 sys sys 1055699701 0
-sys/src/cmd/vac/cache.c - 664 sys sys 1071245791 15806
+sys/src/cmd/vac/cache.c - 664 sys sys 1189020077 15843
 sys/src/cmd/vac/dat.h - 664 sys sys 1162951177 4029
 sys/src/cmd/vac/error.c - 664 sys sys 1036006057 633
 sys/src/cmd/vac/error.h - 664 sys sys 1036024048 327
 sys/src/cmd/vac/file.c - 664 sys sys 1168307519 19922
 sys/src/cmd/vac/fns.h - 664 sys sys 1036006061 1746
-sys/src/cmd/vac/fs.c - 664 sys sys 1162327826 2902
-sys/src/cmd/vac/mkfile - 664 sys sys 1036024045 434
+sys/src/cmd/vac/fs.c - 664 sys sys 1189020075 2950
+sys/src/cmd/vac/mkfile - 664 sys sys 1189020070 435
 sys/src/cmd/vac/pack.c - 664 sys sys 1036006059 10126
 sys/src/cmd/vac/rtest.c - 664 sys sys 1019678787 1116
 sys/src/cmd/vac/source.c - 664 sys sys 1162327879 6767
 sys/src/cmd/vac/srcload.c - 664 sys sys 1036024047 4925
-sys/src/cmd/vac/stdinc.h - 664 sys sys 1036006059 121
+sys/src/cmd/vac/stdinc.h - 664 sys sys 1189020065 122
 sys/src/cmd/vac/util.c - 664 sys sys 1019678787 930
 sys/src/cmd/vac/vac.c - 664 sys sys 1162350579 23803
 sys/src/cmd/vac/vac.h - 664 sys sys 1091904424 3598
@@ -14264,68 +14292,92 @@ sys/src/cmd/vc/swt.c - 664 sys sys 1143384791 10367
 sys/src/cmd/vc/txt.c - 664 sys sys 1168702346 22737
 sys/src/cmd/vc/v.out.h - 664 sys sys 1089299165 2630
 sys/src/cmd/venti - 20000000775 sys sys 1068500904 0
-sys/src/cmd/venti/arena.c - 664 sys sys 1045503653 13221
-sys/src/cmd/venti/arenas.c - 664 sys sys 1063854192 7701
-sys/src/cmd/venti/backup.example - 775 sys sys 1045503662 521
-sys/src/cmd/venti/buildbuck.c - 664 sys sys 1019678877 2282
-sys/src/cmd/venti/buildindex.c - 664 sys sys 1143759340 3162
-sys/src/cmd/venti/checkarenas.c - 664 sys sys 1019854295 1894
-sys/src/cmd/venti/checkindex.c - 664 sys sys 1143759337 4094
-sys/src/cmd/venti/clump.c - 664 sys sys 1019678877 4148
-sys/src/cmd/venti/clumpstats.c - 664 sys sys 1055707430 2239
-sys/src/cmd/venti/conf.rc - 775 sys sys 1055707446 1416
-sys/src/cmd/venti/config.c - 664 sys sys 1138471074 4930
-sys/src/cmd/venti/conv.c - 664 sys sys 1019678878 8202
-sys/src/cmd/venti/copy.c - 664 sys sys 1158618908 3713
-sys/src/cmd/venti/dat.h - 664 sys sys 1132452191 15346
-sys/src/cmd/venti/dcache.c - 664 sys sys 1019678878 7374
-sys/src/cmd/venti/dump.c - 664 sys sys 1068520313 1578
-sys/src/cmd/venti/dumparena.c - 664 sys sys 1019678878 6381
-sys/src/cmd/venti/dumpvacroots - 775 sys sys 1167777001 571
-sys/src/cmd/venti/findscore.c - 664 sys sys 1121977913 2605
-sys/src/cmd/venti/fmtarenas.c - 664 sys sys 1132452192 2213
-sys/src/cmd/venti/fmtindex.c - 664 sys sys 1138471072 2524
-sys/src/cmd/venti/fmtisect.c - 664 sys sys 1132452192 1326
-sys/src/cmd/venti/fns.h - 664 sys sys 1055707422 6793
-sys/src/cmd/venti/httpd.c - 664 sys sys 1045503654 9107
-sys/src/cmd/venti/icache.c - 664 sys sys 1091904425 3974
-sys/src/cmd/venti/ifile.c - 664 sys sys 1055707440 2288
-sys/src/cmd/venti/index.c - 664 sys sys 1045503654 15232
-sys/src/cmd/venti/lump.c - 664 sys sys 1055707441 3844
-sys/src/cmd/venti/lumpcache.c - 664 sys sys 1019678879 7585
-sys/src/cmd/venti/lumpqueue.c - 664 sys sys 1168307536 2278
-sys/src/cmd/venti/mkfile - 664 sys sys 1139839228 1795
-sys/src/cmd/venti/mkroot.c - 664 sys sys 1045503630 1172
-sys/src/cmd/venti/mkxml - 775 sys sys 1019678879 1078
-sys/src/cmd/venti/mkxml.elems - 775 sys sys 1019678880 786
-sys/src/cmd/venti/notes - 664 sys sys 1068500911 4032
-sys/src/cmd/venti/part.c - 664 sys sys 1036389637 2532
-sys/src/cmd/venti/printarena.c - 664 sys sys 1109511493 2675
-sys/src/cmd/venti/rdarena.c - 664 sys sys 1055707432 1621
-sys/src/cmd/venti/read.c - 664 sys sys 1055707434 1723
-sys/src/cmd/venti/score.c - 664 sys sys 1045503655 588
-sys/src/cmd/venti/sortientry.c - 664 sys sys 1143759340 7436
-sys/src/cmd/venti/stats.c - 664 sys sys 1019678880 2099
-sys/src/cmd/venti/stdinc.h - 664 sys sys 1019678880 139
-sys/src/cmd/venti/sync.c - 664 sys sys 1036470213 674
-sys/src/cmd/venti/syncarena.c - 664 sys sys 1183441016 4206
-sys/src/cmd/venti/syncindex.c - 664 sys sys 1055707433 983
-sys/src/cmd/venti/syncindex0.c - 664 sys sys 1036470283 3044
-sys/src/cmd/venti/unittoull.c - 664 sys sys 1019678881 398
-sys/src/cmd/venti/unwhack.c - 664 sys sys 1019678881 3191
-sys/src/cmd/venti/utils.c - 664 sys sys 1127527222 4002
-sys/src/cmd/venti/venti.c - 664 sys sys 1069101830 4626
-sys/src/cmd/venti/venti.conf - 664 sys sys 1019867537 397
-sys/src/cmd/venti/ventifs.c - 664 sys sys 1063854129 6157
-sys/src/cmd/venti/verifyarena.c - 664 sys sys 1019678881 2705
-sys/src/cmd/venti/whack.c - 664 sys sys 1019678881 6375
-sys/src/cmd/venti/whack.h - 664 sys sys 1019678881 966
-sys/src/cmd/venti/wrarena.c - 664 sys sys 1038536023 2948
-sys/src/cmd/venti/write.c - 664 sys sys 1036470214 1051
-sys/src/cmd/venti/wrtape - 775 sys sys 1019678881 555
-sys/src/cmd/venti/xml.c - 664 sys sys 1091904425 2183
-sys/src/cmd/venti/xml.h - 664 sys sys 1019678881 450
-sys/src/cmd/venti/zeropart.c - 664 sys sys 1132452194 877
+sys/src/cmd/venti/copy.c - 664 sys sys 1189017556 5275
+sys/src/cmd/venti/devnull.c - 664 sys sys 1177189434 1225
+sys/src/cmd/venti/mkfile - 664 sys sys 1189017596 358
+sys/src/cmd/venti/mkroot.c - 664 sys sys 1177189435 1178
+sys/src/cmd/venti/randtest.c - 664 sys sys 1177189435 5656
+sys/src/cmd/venti/read.c - 664 sys sys 1177189435 1289
+sys/src/cmd/venti/readlist.c - 664 sys sys 1177189435 1934
+sys/src/cmd/venti/ro.c - 664 sys sys 1177189435 1886
+sys/src/cmd/venti/root.c - 664 sys sys 1177189435 1329
+sys/src/cmd/venti/srv - 20000000775 sys sys 1189020012 0
+sys/src/cmd/venti/srv/arena.c - 664 sys sys 1178160303 16402
+sys/src/cmd/venti/srv/arenas.c - 664 sys sys 1178160303 8039
+sys/src/cmd/venti/srv/bloom.c - 664 sys sys 1178160303 4529
+sys/src/cmd/venti/srv/buildbuck.c - 664 sys sys 1177189435 2837
+sys/src/cmd/venti/srv/buildindex.c - 664 sys sys 1182131900 21117
+sys/src/cmd/venti/srv/checkarenas.c - 664 sys sys 1177189435 2313
+sys/src/cmd/venti/srv/checkindex.c - 664 sys sys 1179342633 5978
+sys/src/cmd/venti/srv/clump.c - 664 sys sys 1177189435 5329
+sys/src/cmd/venti/srv/clumpstats.c - 664 sys sys 1142736351 2234
+sys/src/cmd/venti/srv/cmparena.c - 664 sys sys 1142736351 5471
+sys/src/cmd/venti/srv/cmparenas.c - 664 sys sys 1177189435 7215
+sys/src/cmd/venti/srv/config.c - 664 sys sys 1178160303 5566
+sys/src/cmd/venti/srv/conv.c - 664 sys sys 1178160303 14052
+sys/src/cmd/venti/srv/dat.h - 664 sys sys 1178160303 19018
+sys/src/cmd/venti/srv/dcache.c - 664 sys sys 1178160304 18409
+sys/src/cmd/venti/srv/disksched.c - 664 sys sys 1142736352 2125
+sys/src/cmd/venti/srv/dump.c - 664 sys sys 1142736352 1642
+sys/src/cmd/venti/srv/findscore.c - 664 sys sys 1179863768 2195
+sys/src/cmd/venti/srv/fixarenas.c - 664 sys sys 1178160904 40515
+sys/src/cmd/venti/srv/fixarenas0.c - 664 sys sys 1142736352 36271
+sys/src/cmd/venti/srv/fmtarenas.c - 664 sys sys 1177189436 2702
+sys/src/cmd/venti/srv/fmtbloom.c - 664 sys sys 1142736352 2293
+sys/src/cmd/venti/srv/fmtindex.c - 664 sys sys 1178160304 2599
+sys/src/cmd/venti/srv/fmtisect.c - 664 sys sys 1177189436 1454
+sys/src/cmd/venti/srv/fns.h - 664 sys sys 1178160304 9179
+sys/src/cmd/venti/srv/graph.c - 664 sys sys 1177189436 4190
+sys/src/cmd/venti/srv/hdisk.c - 664 sys sys 1177189437 16510
+sys/src/cmd/venti/srv/httpd.c - 664 sys sys 1177189437 22784
+sys/src/cmd/venti/srv/icache.c - 664 sys sys 1186114652 8778
+sys/src/cmd/venti/srv/icachewrite.c - 664 sys sys 1178160304 7655
+sys/src/cmd/venti/srv/ifile.c - 664 sys sys 1177535026 2327
+sys/src/cmd/venti/srv/index.c - 664 sys sys 1178160304 17239
+sys/src/cmd/venti/srv/index2.c - 664 sys sys 1142736354 21620
+sys/src/cmd/venti/srv/lump.c - 664 sys sys 1177189437 5799
+sys/src/cmd/venti/srv/lumpcache.c - 664 sys sys 1177189437 8811
+sys/src/cmd/venti/srv/lumpqueue.c - 664 sys sys 1142736354 2722
+sys/src/cmd/venti/srv/mirrorarenas.c - 664 sys sys 1178160304 10544
+sys/src/cmd/venti/srv/mkfile - 664 sys sys 1188622141 1032
+sys/src/cmd/venti/srv/part.c - 664 sys sys 1180244694 5662
+sys/src/cmd/venti/srv/png.c - 664 sys sys 1142736354 3729
+sys/src/cmd/venti/srv/printarena.c - 664 sys sys 1177189438 2673
+sys/src/cmd/venti/srv/printarenapart.c - 664 sys sys 1178160304 3544
+sys/src/cmd/venti/srv/printarenas.c - 664 sys sys 1142736355 2074
+sys/src/cmd/venti/srv/printindex.c - 664 sys sys 1142736355 1746
+sys/src/cmd/venti/srv/printmap.c - 664 sys sys 1142736355 542
+sys/src/cmd/venti/srv/rdarena.c - 664 sys sys 1178161030 1637
+sys/src/cmd/venti/srv/readifile.c - 664 sys sys 1177534667 411
+sys/src/cmd/venti/srv/reseal.c - 664 sys sys 1177189438 6682
+sys/src/cmd/venti/srv/round.c - 664 sys sys 1142736355 1577
+sys/src/cmd/venti/srv/score.c - 664 sys sys 1178160305 740
+sys/src/cmd/venti/srv/sortientry.c - 664 sys sys 1177189439 8325
+sys/src/cmd/venti/srv/stats.c - 664 sys sys 1177189439 3912
+sys/src/cmd/venti/srv/stdinc.h - 664 sys sys 1177189439 169
+sys/src/cmd/venti/srv/syncarena.c - 664 sys sys 1177249927 4834
+sys/src/cmd/venti/srv/syncindex.c - 664 sys sys 1177249927 1622
+sys/src/cmd/venti/srv/syncindex0.c - 664 sys sys 1177249927 4447
+sys/src/cmd/venti/srv/trace.c - 664 sys sys 1142736356 709
+sys/src/cmd/venti/srv/unittoull.c - 664 sys sys 1142736356 471
+sys/src/cmd/venti/srv/unwhack.c - 664 sys sys 1142736356 3191
+sys/src/cmd/venti/srv/utils.c - 664 sys sys 1178160305 3755
+sys/src/cmd/venti/srv/venti.c - 664 sys sys 1188624404 5882
+sys/src/cmd/venti/srv/verifyarena.c - 664 sys sys 1178160305 5666
+sys/src/cmd/venti/srv/whack.c - 664 sys sys 1142736357 6419
+sys/src/cmd/venti/srv/whack.h - 664 sys sys 1142736357 966
+sys/src/cmd/venti/srv/wrarena.c - 664 sys sys 1183678902 4647
+sys/src/cmd/venti/srv/www - 20000000775 sys sys 1189019173 0
+sys/src/cmd/venti/srv/www/stats.html - 664 sys sys 1177190826 869
+sys/src/cmd/venti/srv/www/stats.js - 664 sys sys 1177190826 9427
+sys/src/cmd/venti/srv/www/status.js - 664 sys sys 1177190826 452
+sys/src/cmd/venti/srv/www/status1.js - 664 sys sys 1177190826 419
+sys/src/cmd/venti/srv/xml.c - 664 sys sys 1142736357 2236
+sys/src/cmd/venti/srv/xml.h - 664 sys sys 1142736357 450
+sys/src/cmd/venti/srv/zblock.c - 664 sys sys 1178160305 1659
+sys/src/cmd/venti/srv/zeropart.c - 664 sys sys 1178160305 707
+sys/src/cmd/venti/sync.c - 664 sys sys 1177189440 726
+sys/src/cmd/venti/write.c - 664 sys sys 1177189440 1106
 sys/src/cmd/vi - 20000000775 sys sys 1039727599 0
 sys/src/cmd/vi/bpt.c - 664 sys sys 944961341 2216
 sys/src/cmd/vi/cmd.c - 664 sys sys 944961342 9150
@@ -15376,6 +15428,44 @@ sys/src/libndb/ndbopen.c - 664 sys sys 1173737251 2717
 sys/src/libndb/ndbparse.c - 664 sys sys 1144174490 1207
 sys/src/libndb/ndbreorder.c - 664 sys sys 1078618600 966
 sys/src/libndb/ndbsubstitute.c - 664 sys sys 1144174491 867
+sys/src/liboventi - 20000000775 sys sys 1189019654 0
+sys/src/liboventi/client.8 - 664 sys sys 1188621755 11972
+sys/src/liboventi/client.c - 664 sys sys 1188621652 5494
+sys/src/liboventi/debug.8 - 664 sys sys 1188621755 3582
+sys/src/liboventi/debug.c - 664 sys sys 1188621652 1259
+sys/src/liboventi/errfmt.8 - 664 sys sys 1188621755 449
+sys/src/liboventi/errfmt.c - 664 sys sys 1188621652 134
+sys/src/liboventi/fatal.8 - 664 sys sys 1188621755 778
+sys/src/liboventi/fatal.c - 664 sys sys 1188621652 226
+sys/src/liboventi/mkfile - 664 sys sys 1188621776 577
+sys/src/liboventi/pack.8 - 664 sys sys 1188621755 5477
+sys/src/liboventi/pack.c - 664 sys sys 1188621652 2852
+sys/src/liboventi/packet.8 - 664 sys sys 1188621755 24906
+sys/src/liboventi/packet.c - 664 sys sys 1188621652 13229
+sys/src/liboventi/packet.h - 664 sys sys 1019678692 641
+sys/src/liboventi/parsescore.8 - 664 sys sys 1188621755 1208
+sys/src/liboventi/parsescore.c - 664 sys sys 1188621652 517
+sys/src/liboventi/plan9-io.8 - 664 sys sys 1188621756 3811
+sys/src/liboventi/plan9-io.c - 664 sys sys 1188621652 1759
+sys/src/liboventi/plan9-sha1.8 - 664 sys sys 1188621756 2021
+sys/src/liboventi/plan9-sha1.c - 664 sys sys 1188621652 1059
+sys/src/liboventi/plan9-thread.8 - 664 sys sys 1188621756 9994
+sys/src/liboventi/plan9-thread.acid - 664 sys sys 1138756224 9254
+sys/src/liboventi/plan9-thread.c - 664 sys sys 1188621652 6714
+sys/src/liboventi/readfully.8 - 664 sys sys 1188621755 740
+sys/src/liboventi/readfully.c - 664 sys sys 1188621652 238
+sys/src/liboventi/rpc.8 - 664 sys sys 1188621755 16009
+sys/src/liboventi/rpc.c - 664 sys sys 1188621652 7297
+sys/src/liboventi/scorefmt.8 - 664 sys sys 1188621755 862
+sys/src/liboventi/scorefmt.c - 664 sys sys 1188621652 256
+sys/src/liboventi/server.8 - 664 sys sys 1188621756 10569
+sys/src/liboventi/server.c - 664 sys sys 1188621652 4508
+sys/src/liboventi/session.h - 664 sys sys 1063853749 936
+sys/src/liboventi/strdup.8 - 664 sys sys 1188621756 640
+sys/src/liboventi/strdup.c - 664 sys sys 1188621652 204
+sys/src/liboventi/venti.txt - 664 sys sys 1045502097 4347
+sys/src/liboventi/zero.8 - 664 sys sys 1188621756 3268
+sys/src/liboventi/zero.c - 664 sys sys 1188621652 1510
 sys/src/libplumb - 20000000775 sys sys 1123099015 0
 sys/src/libplumb/event.c - 664 sys sys 947358887 1861
 sys/src/libplumb/mesg.c - 664 sys sys 1133279518 7080
@@ -15589,26 +15679,41 @@ sys/src/libthread/xincmips.s - 664 sys sys 1014928160 674
 sys/src/libthread/xincport.h - 664 sys sys 1127405405 211
 sys/src/libthread/xincpower.s - 664 sys sys 1048645448 342
 sys/src/libventi - 20000000775 sys sys 1063853749 0
-sys/src/libventi/client.c - 664 sys sys 1138191441 5493
-sys/src/libventi/debug.c - 664 sys sys 1045502093 1258
-sys/src/libventi/errfmt.c - 664 sys sys 1019678691 133
-sys/src/libventi/fatal.c - 664 sys sys 1084468118 225
-sys/src/libventi/mkfile - 664 sys sys 1045502094 576
-sys/src/libventi/pack.c - 664 sys sys 1045502094 2851
-sys/src/libventi/packet.c - 664 sys sys 1143695310 13228
-sys/src/libventi/packet.h - 664 sys sys 1019678692 641
-sys/src/libventi/parsescore.c - 664 sys sys 1045502095 516
-sys/src/libventi/plan9-io.c - 664 sys sys 1135487933 1758
-sys/src/libventi/plan9-sha1.c - 664 sys sys 1045502095 1058
-sys/src/libventi/plan9-thread.c - 664 sys sys 1135487955 6713
-sys/src/libventi/readfully.c - 664 sys sys 1045502095 237
-sys/src/libventi/rpc.c - 664 sys sys 1166821900 7296
-sys/src/libventi/scorefmt.c - 664 sys sys 1045502096 255
-sys/src/libventi/server.c - 664 sys sys 1045502096 4507
-sys/src/libventi/session.h - 664 sys sys 1063853749 936
-sys/src/libventi/strdup.c - 664 sys sys 1045502096 203
-sys/src/libventi/venti.txt - 664 sys sys 1045502097 4347
-sys/src/libventi/zero.c - 664 sys sys 1045502097 1509
+sys/src/libventi/cache.acid - 664 sys sys 1177189440 11960
+sys/src/libventi/cache.c - 664 sys sys 1177189440 11925
+sys/src/libventi/client.c - 664 sys sys 1177189440 3197
+sys/src/libventi/conn.c - 664 sys sys 1177189440 895
+sys/src/libventi/cvt.h - 664 sys sys 1142736171 610
+sys/src/libventi/debug.c - 664 sys sys 1177189440 201
+sys/src/libventi/debugpacket.c - 664 sys sys 1177189441 3838
+sys/src/libventi/dial.c - 664 sys sys 1177189441 378
+sys/src/libventi/dtype.c - 664 sys sys 1177189441 1117
+sys/src/libventi/entry.c - 664 sys sys 1177189441 1779
+sys/src/libventi/fcall.c - 664 sys sys 1177189441 3765
+sys/src/libventi/fcallfmt.c - 664 sys sys 1177189441 1912
+sys/src/libventi/file.c - 664 sys sys 1177189441 23509
+sys/src/libventi/hangup.c - 664 sys sys 1177189441 547
+sys/src/libventi/log.c - 664 sys sys 1179957535 3742
+sys/src/libventi/mem.c - 664 sys sys 1177189441 1184
+sys/src/libventi/mkfile - 664 sys sys 1188621815 512
+sys/src/libventi/packet.acid - 664 sys sys 1143389340 21446
+sys/src/libventi/packet.c - 664 sys sys 1177189441 15894
+sys/src/libventi/parsescore.c - 664 sys sys 1177189441 719
+sys/src/libventi/queue.c - 664 sys sys 1177189441 1571
+sys/src/libventi/queue.h - 664 sys sys 1177189441 233
+sys/src/libventi/root.c - 664 sys sys 1177189441 1218
+sys/src/libventi/rpc.acid - 664 sys sys 1143491745 12592
+sys/src/libventi/rpc.c - 664 sys sys 1177189442 3174
+sys/src/libventi/scorefmt.c - 664 sys sys 1177189442 248
+sys/src/libventi/send.c - 664 sys sys 1177189442 4395
+sys/src/libventi/server.c - 664 sys sys 1179957527 3693
+sys/src/libventi/srvhello.c - 664 sys sys 1177189442 833
+sys/src/libventi/strdup.c - 664 sys sys 1177189442 201
+sys/src/libventi/string.c - 664 sys sys 1177189442 737
+sys/src/libventi/time.c - 664 sys sys 1177189442 497
+sys/src/libventi/version.c - 664 sys sys 1177189442 2174
+sys/src/libventi/zero.c - 664 sys sys 1177189442 899
+sys/src/libventi/zeroscore.c - 664 sys sys 1177189442 248
 sys/src/mkfile - 664 sys sys 1110437421 1005
 sys/src/mkfile.proto - 664 sys sys 1105121349 265
 tmp - 20000000555 sys sys 1020896384 0
@@ -15631,3 +15736,7 @@ usr/glenda/lib/profile - 664 glenda glenda 1105128663 890
 usr/glenda/readme.acme - 664 glenda glenda 1019860628 4753
 usr/glenda/readme.rio - 664 glenda glenda 1019860628 6370
 usr/glenda/tmp - 20000000775 glenda glenda 1018802620 0
+386/bin/cwfs - 775 sys sys 1189048120 365605
+386/lib/libventi.a - 664 sys sys 1189048123 189448
+sys/src/cmd/aquarela/nblistener.c - 664 sys sys 1189049390 687
+sys/src/mkfile - 664 sys sys 1189049203 1017

+ 204 - 99
dist/replica/plan9.db

@@ -120,7 +120,7 @@
 386/bin/aux/ms2 - 775 sys sys 1188530147 88499
 386/bin/aux/msexceltables - 775 sys sys 1168402283 82921
 386/bin/aux/mswordstrings - 775 sys sys 1168402283 65541
-386/bin/aux/na - 775 sys sys 1168402284 154423
+386/bin/aux/na - 775 sys sys 1189023884 154372
 386/bin/aux/nfsmount - 775 sys sys 1184731233 233217
 386/bin/aux/nfsserver - 775 sys sys 1182223285 184719
 386/bin/aux/olefs - 775 sys sys 1179372075 148111
@@ -191,7 +191,7 @@
 386/bin/cpp - 775 sys sys 1188446882 149057
 386/bin/cpu - 775 sys sys 1188446885 139216
 386/bin/crop - 775 sys sys 1168402298 116374
-386/bin/cwfs - 775 sys sys 1188446894 365325
+386/bin/cwfs - 775 sys sys 1189048120 365605
 386/bin/date - 775 sys sys 1178568265 41845
 386/bin/db - 775 sys sys 1188499570 349188
 386/bin/dc - 775 sys sys 1168402299 99260
@@ -569,6 +569,7 @@
 386/lib/libmemlayer.a - 664 sys sys 1168402369 47360
 386/lib/libmp.a - 664 sys sys 1188447454 79978
 386/lib/libndb.a - 664 sys sys 1187061208 64470
+386/lib/liboventi.a - 664 sys sys 1188621781 99062
 386/lib/libplumb.a - 664 sys sys 1168402370 19408
 386/lib/libregexp.a - 664 sys sys 1181507273 37290
 386/lib/libscribble.a - 664 sys sys 1175972562 107238
@@ -576,7 +577,7 @@
 386/lib/libstdio.a - 664 sys sys 1176432133 126062
 386/lib/libsunrpc.a - 664 sys sys 1187061209 353148
 386/lib/libthread.a - 664 sys sys 1184731247 71918
-386/lib/libventi.a - 664 sys sys 1188447470 97858
+386/lib/libventi.a - 664 sys sys 1189048123 189448
 386/mbr - 775 sys sys 1131317338 407
 386/mkfile - 664 sys sys 948141303 46
 386/pbs - 775 sys sys 1143465402 495
@@ -6093,6 +6094,7 @@ sys/include/mouse.h - 664 sys sys 1035232010 1003
 sys/include/mp.h - 664 sys sys 1176499134 4803
 sys/include/ndb.h - 664 sys sys 1144174492 4412
 sys/include/nfs3.h - 664 sys sys 1045589438 15082
+sys/include/oventi.h - 664 sys sys 1188621731 7152
 sys/include/plumb.h - 664 sys sys 1014929065 989
 sys/include/pool.h - 664 sys sys 1102093074 1219
 sys/include/rdbg.h - 664 sys sys 1014929066 95
@@ -6104,7 +6106,7 @@ sys/include/sunrpc.h - 664 sys sys 1046367129 7219
 sys/include/thread.h - 664 sys sys 1184471649 3586
 sys/include/tos.h - 664 sys sys 1091904418 575
 sys/include/trace.h - 664 sys sys 1138460022 640
-sys/include/venti.h - 664 sys sys 1091904426 7150
+sys/include/venti.h - 664 sys sys 1188621741 9941
 sys/lib - 20000000775 sys sys 1105564897 0
 sys/lib/acid - 20000000775 sys sys 1114524607 0
 sys/lib/acid/386 - 664 sys sys 1168035402 3188
@@ -7476,6 +7478,7 @@ sys/man/1/uniq - 664 sys sys 944959674 995
 sys/man/1/units - 664 sys sys 1113743326 2046
 sys/man/1/uptime - 664 sys sys 1074733782 380
 sys/man/1/vac - 664 sys sys 1162102172 3244
+sys/man/1/venti - 664 sys sys 1188620038 2445
 sys/man/1/vi - 664 sys sys 1101668051 2904
 sys/man/1/vnc - 664 sys sys 1158063994 4313
 sys/man/1/vt - 664 sys sys 1186695303 2424
@@ -7630,6 +7633,16 @@ sys/man/2/symbol - 664 sys sys 950892874 9423
 sys/man/2/thread - 664 sys sys 1188841215 11916
 sys/man/2/time - 664 sys sys 1182980757 736
 sys/man/2/tmpfile - 664 sys sys 1048637161 1157
+sys/man/2/venti-cache - 664 sys sys 1188620038 5022
+sys/man/2/venti-client - 664 sys sys 1188620038 3339
+sys/man/2/venti-conn - 664 sys sys 1188620038 3600
+sys/man/2/venti-fcall - 664 sys sys 1188620038 4739
+sys/man/2/venti-file - 664 sys sys 1188620038 5840
+sys/man/2/venti-log - 664 sys sys 1188620038 2313
+sys/man/2/venti-mem - 664 sys sys 1188620038 1023
+sys/man/2/venti-packet - 664 sys sys 1188620038 4573
+sys/man/2/venti-server - 664 sys sys 1188620038 2201
+sys/man/2/venti-zero - 664 sys sys 1188620038 1064
 sys/man/2/wait - 664 sys sys 1163004064 2525
 sys/man/2/window - 664 sys sys 950593499 5522
 sys/man/3 - 20000000775 sys sys 1123100836 0
@@ -7680,7 +7693,7 @@ sys/man/4/archfs - 664 sys sys 960000712 533
 sys/man/4/cdfs - 664 sys sys 1026846913 3638
 sys/man/4/cfs - 664 sys sys 1172762903 1813
 sys/man/4/consolefs - 664 sys sys 1144424854 4245
-sys/man/4/cwfs - 664 sys sys 1178224996 6225
+sys/man/4/cwfs - 664 sys sys 1189029640 6255
 sys/man/4/dossrv - 664 sys sys 1168307403 4334
 sys/man/4/execnet - 664 sys sys 1019866708 1069
 sys/man/4/exportfs - 664 sys sys 1145881912 4655
@@ -7763,7 +7776,8 @@ sys/man/6/snap - 664 sys sys 1132452694 2402
 sys/man/6/thumbprint - 664 sys sys 1019866709 1124
 sys/man/6/users - 664 sys sys 1130912014 1392
 sys/man/6/utf - 664 sys sys 1146582112 2430
-sys/man/6/venti.conf - 664 sys sys 1164860945 1929
+sys/man/6/venti - 664 sys sys 1188620038 10695
+sys/man/6/venti.conf - 664 sys sys 1164860473 1929
 sys/man/6/vgadb - 664 sys sys 960256513 10972
 sys/man/7 - 20000000775 sys sys 1103794042 0
 sys/man/7/0intro - 664 sys sys 944959677 256
@@ -7842,8 +7856,9 @@ sys/man/8/tlssrv - 664 sys sys 1165623041 2589
 sys/man/8/trampoline - 664 sys sys 1126104844 1199
 sys/man/8/udpecho - 664 sys sys 954305553 303
 sys/man/8/update - 664 sys sys 961259288 2336
-sys/man/8/venti - 664 sys sys 1164860929 5434
-sys/man/8/ventiaux - 664 sys sys 1159419552 10571
+sys/man/8/venti - 664 sys sys 1188620038 12188
+sys/man/8/venti-backup - 664 sys sys 1188620038 2102
+sys/man/8/venti-fmt - 664 sys sys 1188620038 8626
 sys/man/8/vga - 664 sys sys 1141660952 3856
 sys/man/fonts - 664 sys sys 944959700 218
 sys/man/index.html - 664 sys sys 1019918444 1859
@@ -9453,7 +9468,7 @@ sys/src/cmd/aquarela/nb.c - 664 sys sys 1135892109 538
 sys/src/cmd/aquarela/nbdgram.c - 664 sys sys 1135892109 4364
 sys/src/cmd/aquarela/nbdgramconv.c - 664 sys sys 1135892109 2339
 sys/src/cmd/aquarela/nbdgramdump.c - 664 sys sys 1135892109 506
-sys/src/cmd/aquarela/nblistener.c - 664 sys sys 1135892109 738
+sys/src/cmd/aquarela/nblistener.c - 664 sys sys 1189049390 687
 sys/src/cmd/aquarela/nbname.c - 664 sys sys 1135892109 5457
 sys/src/cmd/aquarela/nbns.c - 664 sys sys 1135892109 2747
 sys/src/cmd/aquarela/nbnsconv.c - 664 sys sys 1135892109 6257
@@ -10071,7 +10086,7 @@ sys/src/cmd/cwfs/io.h - 664 sys sys 1174280312 866
 sys/src/cmd/cwfs/iobuf.c - 664 sys sys 1176500092 4722
 sys/src/cmd/cwfs/juke.c - 664 sys sys 1176500144 28859
 sys/src/cmd/cwfs/lrand.c - 664 sys sys 1171160167 1070
-sys/src/cmd/cwfs/main.c - 664 sys sys 1174799729 9976
+sys/src/cmd/cwfs/main.c - 664 sys sys 1189033288 10146
 sys/src/cmd/cwfs/malloc.c - 664 sys sys 1174281557 2360
 sys/src/cmd/cwfs/mkfile - 664 sys sys 1174941889 201
 sys/src/cmd/cwfs/mworm.c - 664 sys sys 1174370308 4311
@@ -10369,13 +10384,13 @@ sys/src/cmd/fossil/fs.h - 664 sys sys 1139667269 1581
 sys/src/cmd/fossil/history - 664 sys sys 1055703793 1400
 sys/src/cmd/fossil/invariants - 664 sys sys 1042005509 4073
 sys/src/cmd/fossil/last.c - 664 sys sys 1087005593 812
-sys/src/cmd/fossil/mkfile - 664 sys sys 1139667242 2640
+sys/src/cmd/fossil/mkfile - 664 sys sys 1189020178 2641
 sys/src/cmd/fossil/nobwatch.c - 664 sys sys 1042005509 329
 sys/src/cmd/fossil/pack.c - 664 sys sys 1187136436 4710
 sys/src/cmd/fossil/periodic.c - 664 sys sys 1061530726 1087
 sys/src/cmd/fossil/source.c - 664 sys sys 1187135867 20578
 sys/src/cmd/fossil/srcload.c - 664 sys sys 1042005510 4178
-sys/src/cmd/fossil/stdinc.h - 664 sys sys 1042005510 155
+sys/src/cmd/fossil/stdinc.h - 664 sys sys 1189020178 156
 sys/src/cmd/fossil/trunc.c - 664 sys sys 1042005511 280
 sys/src/cmd/fossil/unpack - 775 sys sys 1042005511 286
 sys/src/cmd/fossil/vac.c - 664 sys sys 1061530727 12483
@@ -12781,6 +12796,19 @@ sys/src/cmd/nfs.c - 664 sys sys 1050068720 31096
 sys/src/cmd/nm.c - 664 sys sys 1148106943 5322
 sys/src/cmd/nntpfs.c - 664 sys sys 1143695271 18860
 sys/src/cmd/ns.c - 664 sys sys 984717934 3558
+sys/src/cmd/oventi - 20000000775 sys sys 1189019154 0
+sys/src/cmd/oventi/README - 664 sys sys 1189018077 63
+sys/src/cmd/oventi/backup.example - 775 sys sys 1045503662 521
+sys/src/cmd/oventi/conf.rc - 775 sys sys 1055707446 1416
+sys/src/cmd/oventi/copy.c - 664 sys sys 1158618728 3713
+sys/src/cmd/oventi/dat.h - 664 sys sys 1128337707 15346
+sys/src/cmd/oventi/dumpvacroots - 775 sys sys 1163468045 571
+sys/src/cmd/oventi/fns.h - 664 sys sys 1055707422 6793
+sys/src/cmd/oventi/mkfile - 664 sys sys 1189018610 256
+sys/src/cmd/oventi/notes - 664 sys sys 1068500911 4032
+sys/src/cmd/oventi/stdinc.h - 664 sys sys 1188621931 140
+sys/src/cmd/oventi/venti.conf - 664 sys sys 1019867537 397
+sys/src/cmd/oventi/wrtape - 775 sys sys 1019678881 555
 sys/src/cmd/p.c - 664 sys sys 1121977162 1504
 sys/src/cmd/page - 20000000775 sys sys 1045606937 0
 sys/src/cmd/page/filter.c - 664 sys sys 1069793856 2166
@@ -14228,19 +14256,19 @@ sys/src/cmd/va/l.s - 664 sys sys 944961340 12696
 sys/src/cmd/va/lex.c - 664 sys sys 1143293804 12095
 sys/src/cmd/va/mkfile - 664 sys sys 944961340 215
 sys/src/cmd/vac - 20000000775 sys sys 1055699701 0
-sys/src/cmd/vac/cache.c - 664 sys sys 1071245791 15806
+sys/src/cmd/vac/cache.c - 664 sys sys 1189020077 15843
 sys/src/cmd/vac/dat.h - 664 sys sys 1162951177 4029
 sys/src/cmd/vac/error.c - 664 sys sys 1036006057 633
 sys/src/cmd/vac/error.h - 664 sys sys 1036024048 327
 sys/src/cmd/vac/file.c - 664 sys sys 1168307519 19922
 sys/src/cmd/vac/fns.h - 664 sys sys 1036006061 1746
-sys/src/cmd/vac/fs.c - 664 sys sys 1162327826 2902
-sys/src/cmd/vac/mkfile - 664 sys sys 1036024045 434
+sys/src/cmd/vac/fs.c - 664 sys sys 1189020075 2950
+sys/src/cmd/vac/mkfile - 664 sys sys 1189020070 435
 sys/src/cmd/vac/pack.c - 664 sys sys 1036006059 10126
 sys/src/cmd/vac/rtest.c - 664 sys sys 1019678787 1116
 sys/src/cmd/vac/source.c - 664 sys sys 1162327879 6767
 sys/src/cmd/vac/srcload.c - 664 sys sys 1036024047 4925
-sys/src/cmd/vac/stdinc.h - 664 sys sys 1036006059 121
+sys/src/cmd/vac/stdinc.h - 664 sys sys 1189020065 122
 sys/src/cmd/vac/util.c - 664 sys sys 1019678787 930
 sys/src/cmd/vac/vac.c - 664 sys sys 1162350579 23803
 sys/src/cmd/vac/vac.h - 664 sys sys 1091904424 3598
@@ -14264,68 +14292,92 @@ sys/src/cmd/vc/swt.c - 664 sys sys 1143384791 10367
 sys/src/cmd/vc/txt.c - 664 sys sys 1168702346 22737
 sys/src/cmd/vc/v.out.h - 664 sys sys 1089299165 2630
 sys/src/cmd/venti - 20000000775 sys sys 1068500904 0
-sys/src/cmd/venti/arena.c - 664 sys sys 1045503653 13221
-sys/src/cmd/venti/arenas.c - 664 sys sys 1063854192 7701
-sys/src/cmd/venti/backup.example - 775 sys sys 1045503662 521
-sys/src/cmd/venti/buildbuck.c - 664 sys sys 1019678877 2282
-sys/src/cmd/venti/buildindex.c - 664 sys sys 1143759340 3162
-sys/src/cmd/venti/checkarenas.c - 664 sys sys 1019854295 1894
-sys/src/cmd/venti/checkindex.c - 664 sys sys 1143759337 4094
-sys/src/cmd/venti/clump.c - 664 sys sys 1019678877 4148
-sys/src/cmd/venti/clumpstats.c - 664 sys sys 1055707430 2239
-sys/src/cmd/venti/conf.rc - 775 sys sys 1055707446 1416
-sys/src/cmd/venti/config.c - 664 sys sys 1138471074 4930
-sys/src/cmd/venti/conv.c - 664 sys sys 1019678878 8202
-sys/src/cmd/venti/copy.c - 664 sys sys 1158618908 3713
-sys/src/cmd/venti/dat.h - 664 sys sys 1132452191 15346
-sys/src/cmd/venti/dcache.c - 664 sys sys 1019678878 7374
-sys/src/cmd/venti/dump.c - 664 sys sys 1068520313 1578
-sys/src/cmd/venti/dumparena.c - 664 sys sys 1019678878 6381
-sys/src/cmd/venti/dumpvacroots - 775 sys sys 1167777001 571
-sys/src/cmd/venti/findscore.c - 664 sys sys 1121977913 2605
-sys/src/cmd/venti/fmtarenas.c - 664 sys sys 1132452192 2213
-sys/src/cmd/venti/fmtindex.c - 664 sys sys 1138471072 2524
-sys/src/cmd/venti/fmtisect.c - 664 sys sys 1132452192 1326
-sys/src/cmd/venti/fns.h - 664 sys sys 1055707422 6793
-sys/src/cmd/venti/httpd.c - 664 sys sys 1045503654 9107
-sys/src/cmd/venti/icache.c - 664 sys sys 1091904425 3974
-sys/src/cmd/venti/ifile.c - 664 sys sys 1055707440 2288
-sys/src/cmd/venti/index.c - 664 sys sys 1045503654 15232
-sys/src/cmd/venti/lump.c - 664 sys sys 1055707441 3844
-sys/src/cmd/venti/lumpcache.c - 664 sys sys 1019678879 7585
-sys/src/cmd/venti/lumpqueue.c - 664 sys sys 1168307536 2278
-sys/src/cmd/venti/mkfile - 664 sys sys 1139839228 1795
-sys/src/cmd/venti/mkroot.c - 664 sys sys 1045503630 1172
-sys/src/cmd/venti/mkxml - 775 sys sys 1019678879 1078
-sys/src/cmd/venti/mkxml.elems - 775 sys sys 1019678880 786
-sys/src/cmd/venti/notes - 664 sys sys 1068500911 4032
-sys/src/cmd/venti/part.c - 664 sys sys 1036389637 2532
-sys/src/cmd/venti/printarena.c - 664 sys sys 1109511493 2675
-sys/src/cmd/venti/rdarena.c - 664 sys sys 1055707432 1621
-sys/src/cmd/venti/read.c - 664 sys sys 1055707434 1723
-sys/src/cmd/venti/score.c - 664 sys sys 1045503655 588
-sys/src/cmd/venti/sortientry.c - 664 sys sys 1143759340 7436
-sys/src/cmd/venti/stats.c - 664 sys sys 1019678880 2099
-sys/src/cmd/venti/stdinc.h - 664 sys sys 1019678880 139
-sys/src/cmd/venti/sync.c - 664 sys sys 1036470213 674
-sys/src/cmd/venti/syncarena.c - 664 sys sys 1183441016 4206
-sys/src/cmd/venti/syncindex.c - 664 sys sys 1055707433 983
-sys/src/cmd/venti/syncindex0.c - 664 sys sys 1036470283 3044
-sys/src/cmd/venti/unittoull.c - 664 sys sys 1019678881 398
-sys/src/cmd/venti/unwhack.c - 664 sys sys 1019678881 3191
-sys/src/cmd/venti/utils.c - 664 sys sys 1127527222 4002
-sys/src/cmd/venti/venti.c - 664 sys sys 1069101830 4626
-sys/src/cmd/venti/venti.conf - 664 sys sys 1019867537 397
-sys/src/cmd/venti/ventifs.c - 664 sys sys 1063854129 6157
-sys/src/cmd/venti/verifyarena.c - 664 sys sys 1019678881 2705
-sys/src/cmd/venti/whack.c - 664 sys sys 1019678881 6375
-sys/src/cmd/venti/whack.h - 664 sys sys 1019678881 966
-sys/src/cmd/venti/wrarena.c - 664 sys sys 1038536023 2948
-sys/src/cmd/venti/write.c - 664 sys sys 1036470214 1051
-sys/src/cmd/venti/wrtape - 775 sys sys 1019678881 555
-sys/src/cmd/venti/xml.c - 664 sys sys 1091904425 2183
-sys/src/cmd/venti/xml.h - 664 sys sys 1019678881 450
-sys/src/cmd/venti/zeropart.c - 664 sys sys 1132452194 877
+sys/src/cmd/venti/copy.c - 664 sys sys 1189017556 5275
+sys/src/cmd/venti/devnull.c - 664 sys sys 1177189434 1225
+sys/src/cmd/venti/mkfile - 664 sys sys 1189017596 358
+sys/src/cmd/venti/mkroot.c - 664 sys sys 1177189435 1178
+sys/src/cmd/venti/randtest.c - 664 sys sys 1177189435 5656
+sys/src/cmd/venti/read.c - 664 sys sys 1177189435 1289
+sys/src/cmd/venti/readlist.c - 664 sys sys 1177189435 1934
+sys/src/cmd/venti/ro.c - 664 sys sys 1177189435 1886
+sys/src/cmd/venti/root.c - 664 sys sys 1177189435 1329
+sys/src/cmd/venti/srv - 20000000775 sys sys 1189020012 0
+sys/src/cmd/venti/srv/arena.c - 664 sys sys 1178160303 16402
+sys/src/cmd/venti/srv/arenas.c - 664 sys sys 1178160303 8039
+sys/src/cmd/venti/srv/bloom.c - 664 sys sys 1178160303 4529
+sys/src/cmd/venti/srv/buildbuck.c - 664 sys sys 1177189435 2837
+sys/src/cmd/venti/srv/buildindex.c - 664 sys sys 1182131900 21117
+sys/src/cmd/venti/srv/checkarenas.c - 664 sys sys 1177189435 2313
+sys/src/cmd/venti/srv/checkindex.c - 664 sys sys 1179342633 5978
+sys/src/cmd/venti/srv/clump.c - 664 sys sys 1177189435 5329
+sys/src/cmd/venti/srv/clumpstats.c - 664 sys sys 1142736351 2234
+sys/src/cmd/venti/srv/cmparena.c - 664 sys sys 1142736351 5471
+sys/src/cmd/venti/srv/cmparenas.c - 664 sys sys 1177189435 7215
+sys/src/cmd/venti/srv/config.c - 664 sys sys 1178160303 5566
+sys/src/cmd/venti/srv/conv.c - 664 sys sys 1178160303 14052
+sys/src/cmd/venti/srv/dat.h - 664 sys sys 1178160303 19018
+sys/src/cmd/venti/srv/dcache.c - 664 sys sys 1178160304 18409
+sys/src/cmd/venti/srv/disksched.c - 664 sys sys 1142736352 2125
+sys/src/cmd/venti/srv/dump.c - 664 sys sys 1142736352 1642
+sys/src/cmd/venti/srv/findscore.c - 664 sys sys 1179863768 2195
+sys/src/cmd/venti/srv/fixarenas.c - 664 sys sys 1178160904 40515
+sys/src/cmd/venti/srv/fixarenas0.c - 664 sys sys 1142736352 36271
+sys/src/cmd/venti/srv/fmtarenas.c - 664 sys sys 1177189436 2702
+sys/src/cmd/venti/srv/fmtbloom.c - 664 sys sys 1142736352 2293
+sys/src/cmd/venti/srv/fmtindex.c - 664 sys sys 1178160304 2599
+sys/src/cmd/venti/srv/fmtisect.c - 664 sys sys 1177189436 1454
+sys/src/cmd/venti/srv/fns.h - 664 sys sys 1178160304 9179
+sys/src/cmd/venti/srv/graph.c - 664 sys sys 1177189436 4190
+sys/src/cmd/venti/srv/hdisk.c - 664 sys sys 1177189437 16510
+sys/src/cmd/venti/srv/httpd.c - 664 sys sys 1177189437 22784
+sys/src/cmd/venti/srv/icache.c - 664 sys sys 1186114652 8778
+sys/src/cmd/venti/srv/icachewrite.c - 664 sys sys 1178160304 7655
+sys/src/cmd/venti/srv/ifile.c - 664 sys sys 1177535026 2327
+sys/src/cmd/venti/srv/index.c - 664 sys sys 1178160304 17239
+sys/src/cmd/venti/srv/index2.c - 664 sys sys 1142736354 21620
+sys/src/cmd/venti/srv/lump.c - 664 sys sys 1177189437 5799
+sys/src/cmd/venti/srv/lumpcache.c - 664 sys sys 1177189437 8811
+sys/src/cmd/venti/srv/lumpqueue.c - 664 sys sys 1142736354 2722
+sys/src/cmd/venti/srv/mirrorarenas.c - 664 sys sys 1178160304 10544
+sys/src/cmd/venti/srv/mkfile - 664 sys sys 1188622141 1032
+sys/src/cmd/venti/srv/part.c - 664 sys sys 1180244694 5662
+sys/src/cmd/venti/srv/png.c - 664 sys sys 1142736354 3729
+sys/src/cmd/venti/srv/printarena.c - 664 sys sys 1177189438 2673
+sys/src/cmd/venti/srv/printarenapart.c - 664 sys sys 1178160304 3544
+sys/src/cmd/venti/srv/printarenas.c - 664 sys sys 1142736355 2074
+sys/src/cmd/venti/srv/printindex.c - 664 sys sys 1142736355 1746
+sys/src/cmd/venti/srv/printmap.c - 664 sys sys 1142736355 542
+sys/src/cmd/venti/srv/rdarena.c - 664 sys sys 1178161030 1637
+sys/src/cmd/venti/srv/readifile.c - 664 sys sys 1177534667 411
+sys/src/cmd/venti/srv/reseal.c - 664 sys sys 1177189438 6682
+sys/src/cmd/venti/srv/round.c - 664 sys sys 1142736355 1577
+sys/src/cmd/venti/srv/score.c - 664 sys sys 1178160305 740
+sys/src/cmd/venti/srv/sortientry.c - 664 sys sys 1177189439 8325
+sys/src/cmd/venti/srv/stats.c - 664 sys sys 1177189439 3912
+sys/src/cmd/venti/srv/stdinc.h - 664 sys sys 1177189439 169
+sys/src/cmd/venti/srv/syncarena.c - 664 sys sys 1177249927 4834
+sys/src/cmd/venti/srv/syncindex.c - 664 sys sys 1177249927 1622
+sys/src/cmd/venti/srv/syncindex0.c - 664 sys sys 1177249927 4447
+sys/src/cmd/venti/srv/trace.c - 664 sys sys 1142736356 709
+sys/src/cmd/venti/srv/unittoull.c - 664 sys sys 1142736356 471
+sys/src/cmd/venti/srv/unwhack.c - 664 sys sys 1142736356 3191
+sys/src/cmd/venti/srv/utils.c - 664 sys sys 1178160305 3755
+sys/src/cmd/venti/srv/venti.c - 664 sys sys 1188624404 5882
+sys/src/cmd/venti/srv/verifyarena.c - 664 sys sys 1178160305 5666
+sys/src/cmd/venti/srv/whack.c - 664 sys sys 1142736357 6419
+sys/src/cmd/venti/srv/whack.h - 664 sys sys 1142736357 966
+sys/src/cmd/venti/srv/wrarena.c - 664 sys sys 1183678902 4647
+sys/src/cmd/venti/srv/www - 20000000775 sys sys 1189019173 0
+sys/src/cmd/venti/srv/www/stats.html - 664 sys sys 1177190826 869
+sys/src/cmd/venti/srv/www/stats.js - 664 sys sys 1177190826 9427
+sys/src/cmd/venti/srv/www/status.js - 664 sys sys 1177190826 452
+sys/src/cmd/venti/srv/www/status1.js - 664 sys sys 1177190826 419
+sys/src/cmd/venti/srv/xml.c - 664 sys sys 1142736357 2236
+sys/src/cmd/venti/srv/xml.h - 664 sys sys 1142736357 450
+sys/src/cmd/venti/srv/zblock.c - 664 sys sys 1178160305 1659
+sys/src/cmd/venti/srv/zeropart.c - 664 sys sys 1178160305 707
+sys/src/cmd/venti/sync.c - 664 sys sys 1177189440 726
+sys/src/cmd/venti/write.c - 664 sys sys 1177189440 1106
 sys/src/cmd/vi - 20000000775 sys sys 1039727599 0
 sys/src/cmd/vi/bpt.c - 664 sys sys 944961341 2216
 sys/src/cmd/vi/cmd.c - 664 sys sys 944961342 9150
@@ -15376,6 +15428,44 @@ sys/src/libndb/ndbopen.c - 664 sys sys 1173737251 2717
 sys/src/libndb/ndbparse.c - 664 sys sys 1144174490 1207
 sys/src/libndb/ndbreorder.c - 664 sys sys 1078618600 966
 sys/src/libndb/ndbsubstitute.c - 664 sys sys 1144174491 867
+sys/src/liboventi - 20000000775 sys sys 1189019654 0
+sys/src/liboventi/client.8 - 664 sys sys 1188621755 11972
+sys/src/liboventi/client.c - 664 sys sys 1188621652 5494
+sys/src/liboventi/debug.8 - 664 sys sys 1188621755 3582
+sys/src/liboventi/debug.c - 664 sys sys 1188621652 1259
+sys/src/liboventi/errfmt.8 - 664 sys sys 1188621755 449
+sys/src/liboventi/errfmt.c - 664 sys sys 1188621652 134
+sys/src/liboventi/fatal.8 - 664 sys sys 1188621755 778
+sys/src/liboventi/fatal.c - 664 sys sys 1188621652 226
+sys/src/liboventi/mkfile - 664 sys sys 1188621776 577
+sys/src/liboventi/pack.8 - 664 sys sys 1188621755 5477
+sys/src/liboventi/pack.c - 664 sys sys 1188621652 2852
+sys/src/liboventi/packet.8 - 664 sys sys 1188621755 24906
+sys/src/liboventi/packet.c - 664 sys sys 1188621652 13229
+sys/src/liboventi/packet.h - 664 sys sys 1019678692 641
+sys/src/liboventi/parsescore.8 - 664 sys sys 1188621755 1208
+sys/src/liboventi/parsescore.c - 664 sys sys 1188621652 517
+sys/src/liboventi/plan9-io.8 - 664 sys sys 1188621756 3811
+sys/src/liboventi/plan9-io.c - 664 sys sys 1188621652 1759
+sys/src/liboventi/plan9-sha1.8 - 664 sys sys 1188621756 2021
+sys/src/liboventi/plan9-sha1.c - 664 sys sys 1188621652 1059
+sys/src/liboventi/plan9-thread.8 - 664 sys sys 1188621756 9994
+sys/src/liboventi/plan9-thread.acid - 664 sys sys 1138756224 9254
+sys/src/liboventi/plan9-thread.c - 664 sys sys 1188621652 6714
+sys/src/liboventi/readfully.8 - 664 sys sys 1188621755 740
+sys/src/liboventi/readfully.c - 664 sys sys 1188621652 238
+sys/src/liboventi/rpc.8 - 664 sys sys 1188621755 16009
+sys/src/liboventi/rpc.c - 664 sys sys 1188621652 7297
+sys/src/liboventi/scorefmt.8 - 664 sys sys 1188621755 862
+sys/src/liboventi/scorefmt.c - 664 sys sys 1188621652 256
+sys/src/liboventi/server.8 - 664 sys sys 1188621756 10569
+sys/src/liboventi/server.c - 664 sys sys 1188621652 4508
+sys/src/liboventi/session.h - 664 sys sys 1063853749 936
+sys/src/liboventi/strdup.8 - 664 sys sys 1188621756 640
+sys/src/liboventi/strdup.c - 664 sys sys 1188621652 204
+sys/src/liboventi/venti.txt - 664 sys sys 1045502097 4347
+sys/src/liboventi/zero.8 - 664 sys sys 1188621756 3268
+sys/src/liboventi/zero.c - 664 sys sys 1188621652 1510
 sys/src/libplumb - 20000000775 sys sys 1123099015 0
 sys/src/libplumb/event.c - 664 sys sys 947358887 1861
 sys/src/libplumb/mesg.c - 664 sys sys 1133279518 7080
@@ -15589,27 +15679,42 @@ sys/src/libthread/xincmips.s - 664 sys sys 1014928160 674
 sys/src/libthread/xincport.h - 664 sys sys 1127405405 211
 sys/src/libthread/xincpower.s - 664 sys sys 1048645448 342
 sys/src/libventi - 20000000775 sys sys 1063853749 0
-sys/src/libventi/client.c - 664 sys sys 1138191441 5493
-sys/src/libventi/debug.c - 664 sys sys 1045502093 1258
-sys/src/libventi/errfmt.c - 664 sys sys 1019678691 133
-sys/src/libventi/fatal.c - 664 sys sys 1084468118 225
-sys/src/libventi/mkfile - 664 sys sys 1045502094 576
-sys/src/libventi/pack.c - 664 sys sys 1045502094 2851
-sys/src/libventi/packet.c - 664 sys sys 1143695310 13228
-sys/src/libventi/packet.h - 664 sys sys 1019678692 641
-sys/src/libventi/parsescore.c - 664 sys sys 1045502095 516
-sys/src/libventi/plan9-io.c - 664 sys sys 1135487933 1758
-sys/src/libventi/plan9-sha1.c - 664 sys sys 1045502095 1058
-sys/src/libventi/plan9-thread.c - 664 sys sys 1135487955 6713
-sys/src/libventi/readfully.c - 664 sys sys 1045502095 237
-sys/src/libventi/rpc.c - 664 sys sys 1166821900 7296
-sys/src/libventi/scorefmt.c - 664 sys sys 1045502096 255
-sys/src/libventi/server.c - 664 sys sys 1045502096 4507
-sys/src/libventi/session.h - 664 sys sys 1063853749 936
-sys/src/libventi/strdup.c - 664 sys sys 1045502096 203
-sys/src/libventi/venti.txt - 664 sys sys 1045502097 4347
-sys/src/libventi/zero.c - 664 sys sys 1045502097 1509
-sys/src/mkfile - 664 sys sys 1110437421 1005
+sys/src/libventi/cache.acid - 664 sys sys 1177189440 11960
+sys/src/libventi/cache.c - 664 sys sys 1177189440 11925
+sys/src/libventi/client.c - 664 sys sys 1177189440 3197
+sys/src/libventi/conn.c - 664 sys sys 1177189440 895
+sys/src/libventi/cvt.h - 664 sys sys 1142736171 610
+sys/src/libventi/debug.c - 664 sys sys 1177189440 201
+sys/src/libventi/debugpacket.c - 664 sys sys 1177189441 3838
+sys/src/libventi/dial.c - 664 sys sys 1177189441 378
+sys/src/libventi/dtype.c - 664 sys sys 1177189441 1117
+sys/src/libventi/entry.c - 664 sys sys 1177189441 1779
+sys/src/libventi/fcall.c - 664 sys sys 1177189441 3765
+sys/src/libventi/fcallfmt.c - 664 sys sys 1177189441 1912
+sys/src/libventi/file.c - 664 sys sys 1177189441 23509
+sys/src/libventi/hangup.c - 664 sys sys 1177189441 547
+sys/src/libventi/log.c - 664 sys sys 1179957535 3742
+sys/src/libventi/mem.c - 664 sys sys 1177189441 1184
+sys/src/libventi/mkfile - 664 sys sys 1188621815 512
+sys/src/libventi/packet.acid - 664 sys sys 1143389340 21446
+sys/src/libventi/packet.c - 664 sys sys 1177189441 15894
+sys/src/libventi/parsescore.c - 664 sys sys 1177189441 719
+sys/src/libventi/queue.c - 664 sys sys 1177189441 1571
+sys/src/libventi/queue.h - 664 sys sys 1177189441 233
+sys/src/libventi/root.c - 664 sys sys 1177189441 1218
+sys/src/libventi/rpc.acid - 664 sys sys 1143491745 12592
+sys/src/libventi/rpc.c - 664 sys sys 1177189442 3174
+sys/src/libventi/scorefmt.c - 664 sys sys 1177189442 248
+sys/src/libventi/send.c - 664 sys sys 1177189442 4395
+sys/src/libventi/server.c - 664 sys sys 1179957527 3693
+sys/src/libventi/srvhello.c - 664 sys sys 1177189442 833
+sys/src/libventi/strdup.c - 664 sys sys 1177189442 201
+sys/src/libventi/string.c - 664 sys sys 1177189442 737
+sys/src/libventi/time.c - 664 sys sys 1177189442 497
+sys/src/libventi/version.c - 664 sys sys 1177189442 2174
+sys/src/libventi/zero.c - 664 sys sys 1177189442 899
+sys/src/libventi/zeroscore.c - 664 sys sys 1177189442 248
+sys/src/mkfile - 664 sys sys 1189049203 1017
 sys/src/mkfile.proto - 664 sys sys 1105121349 265
 tmp - 20000000555 sys sys 1020896384 0
 usr - 20000000775 sys sys 953406542 0

+ 275 - 0
dist/replica/plan9.log

@@ -52378,3 +52378,278 @@
 1188923403 1 c sys/src/9/port/sysproc.c - 664 sys sys 1188922870 21419
 1188955804 0 c sys/man/2/exec - 664 sys sys 1188955837 4230
 1188957605 0 c sys/src/cmd/aux/na/na.y - 775 sys sys 1188957547 25129
+1189020603 0 a 386/lib/liboventi.a - 664 sys sys 1188621781 99062
+1189020603 1 c 386/lib/libventi.a - 664 sys sys 1188621843 191156
+1189020603 2 a sys/include/oventi.h - 664 sys sys 1188621731 7152
+1189020603 3 c sys/include/venti.h - 664 sys sys 1188621741 9941
+1189020603 4 a sys/man/1/venti - 664 sys sys 1188620038 2445
+1189020603 5 a sys/man/2/venti-cache - 664 sys sys 1188620038 5022
+1189020603 6 a sys/man/2/venti-client - 664 sys sys 1188620038 3339
+1189020603 7 a sys/man/2/venti-conn - 664 sys sys 1188620038 3600
+1189020603 8 a sys/man/2/venti-fcall - 664 sys sys 1188620038 4739
+1189020603 9 a sys/man/2/venti-file - 664 sys sys 1188620038 5840
+1189020603 10 a sys/man/2/venti-log - 664 sys sys 1188620038 2313
+1189020603 11 a sys/man/2/venti-mem - 664 sys sys 1188620038 1023
+1189020603 12 a sys/man/2/venti-packet - 664 sys sys 1188620038 4573
+1189020603 13 a sys/man/2/venti-server - 664 sys sys 1188620038 2201
+1189020603 14 a sys/man/2/venti-zero - 664 sys sys 1188620038 1064
+1189020603 15 a sys/man/6/venti - 664 sys sys 1188620038 10695
+1189020603 16 c sys/man/6/venti.conf - 664 sys sys 1164860473 1929
+1189020603 17 c sys/man/8/venti - 664 sys sys 1188620038 12188
+1189020603 18 a sys/man/8/venti-backup - 664 sys sys 1188620038 2102
+1189020603 19 a sys/man/8/venti-fmt - 664 sys sys 1188620038 8626
+1189020603 20 c sys/src/cmd/vac/cache.c - 664 sys sys 1189020077 15843
+1189020603 21 c sys/src/cmd/vac/fs.c - 664 sys sys 1189020075 2950
+1189020603 22 c sys/src/cmd/vac/mkfile - 664 sys sys 1189020070 435
+1189020603 23 c sys/src/cmd/vac/stdinc.h - 664 sys sys 1189020065 122
+1189020603 24 c sys/src/cmd/venti/copy.c - 664 sys sys 1189017556 5275
+1189020603 25 a sys/src/cmd/venti/devnull.c - 664 sys sys 1177189434 1225
+1189020603 26 c sys/src/cmd/venti/mkfile - 664 sys sys 1189017596 358
+1189020603 27 c sys/src/cmd/venti/mkroot.c - 664 sys sys 1177189435 1178
+1189020603 28 a sys/src/cmd/venti/randtest.c - 664 sys sys 1177189435 5656
+1189020603 29 c sys/src/cmd/venti/read.c - 664 sys sys 1177189435 1289
+1189020603 30 a sys/src/cmd/venti/readlist.c - 664 sys sys 1177189435 1934
+1189020603 31 a sys/src/cmd/venti/ro.c - 664 sys sys 1177189435 1886
+1189020603 32 a sys/src/cmd/venti/root.c - 664 sys sys 1177189435 1329
+1189020603 33 a sys/src/cmd/venti/srv - 20000000775 sys sys 1189020012 0
+1189020603 34 a sys/src/cmd/venti/srv/arena.c - 664 sys sys 1178160303 16402
+1189020603 35 a sys/src/cmd/venti/srv/arenas.c - 664 sys sys 1178160303 8039
+1189020603 36 a sys/src/cmd/venti/srv/bloom.c - 664 sys sys 1178160303 4529
+1189020603 37 a sys/src/cmd/venti/srv/buildbuck.c - 664 sys sys 1177189435 2837
+1189020603 38 a sys/src/cmd/venti/srv/buildindex.c - 664 sys sys 1182131900 21117
+1189020603 39 a sys/src/cmd/venti/srv/checkarenas.c - 664 sys sys 1177189435 2313
+1189020603 40 a sys/src/cmd/venti/srv/checkindex.c - 664 sys sys 1179342633 5978
+1189020603 41 a sys/src/cmd/venti/srv/clump.c - 664 sys sys 1177189435 5329
+1189020603 42 a sys/src/cmd/venti/srv/clumpstats.c - 664 sys sys 1142736351 2234
+1189020603 43 a sys/src/cmd/venti/srv/cmparena.c - 664 sys sys 1142736351 5471
+1189020603 44 a sys/src/cmd/venti/srv/cmparenas.c - 664 sys sys 1177189435 7215
+1189020603 45 a sys/src/cmd/venti/srv/config.c - 664 sys sys 1178160303 5566
+1189020603 46 a sys/src/cmd/venti/srv/conv.c - 664 sys sys 1178160303 14052
+1189020603 47 a sys/src/cmd/venti/srv/dat.h - 664 sys sys 1178160303 19018
+1189020603 48 a sys/src/cmd/venti/srv/dcache.c - 664 sys sys 1178160304 18409
+1189020603 49 a sys/src/cmd/venti/srv/disksched.c - 664 sys sys 1142736352 2125
+1189020603 50 a sys/src/cmd/venti/srv/dump.c - 664 sys sys 1142736352 1642
+1189020603 51 a sys/src/cmd/venti/srv/findscore.c - 664 sys sys 1179863768 2195
+1189020603 52 a sys/src/cmd/venti/srv/fixarenas.c - 664 sys sys 1178160904 40515
+1189020603 53 a sys/src/cmd/venti/srv/fixarenas0.c - 664 sys sys 1142736352 36271
+1189020603 54 a sys/src/cmd/venti/srv/fmtarenas.c - 664 sys sys 1177189436 2702
+1189020603 55 a sys/src/cmd/venti/srv/fmtbloom.c - 664 sys sys 1142736352 2293
+1189020603 56 a sys/src/cmd/venti/srv/fmtindex.c - 664 sys sys 1178160304 2599
+1189020603 57 a sys/src/cmd/venti/srv/fmtisect.c - 664 sys sys 1177189436 1454
+1189020603 58 a sys/src/cmd/venti/srv/fns.h - 664 sys sys 1178160304 9179
+1189020603 59 a sys/src/cmd/venti/srv/graph.c - 664 sys sys 1177189436 4190
+1189020603 60 a sys/src/cmd/venti/srv/hdisk.c - 664 sys sys 1177189437 16510
+1189020603 61 a sys/src/cmd/venti/srv/httpd.c - 664 sys sys 1177189437 22784
+1189020603 62 a sys/src/cmd/venti/srv/icache.c - 664 sys sys 1186114652 8778
+1189020603 63 a sys/src/cmd/venti/srv/icachewrite.c - 664 sys sys 1178160304 7655
+1189020603 64 a sys/src/cmd/venti/srv/ifile.c - 664 sys sys 1177535026 2327
+1189020603 65 a sys/src/cmd/venti/srv/index.c - 664 sys sys 1178160304 17239
+1189020603 66 a sys/src/cmd/venti/srv/index2.c - 664 sys sys 1142736354 21620
+1189020603 67 a sys/src/cmd/venti/srv/lump.c - 664 sys sys 1177189437 5799
+1189020603 68 a sys/src/cmd/venti/srv/lumpcache.c - 664 sys sys 1177189437 8811
+1189020603 69 a sys/src/cmd/venti/srv/lumpqueue.c - 664 sys sys 1142736354 2722
+1189020603 70 a sys/src/cmd/venti/srv/mirrorarenas.c - 664 sys sys 1178160304 10544
+1189020603 71 a sys/src/cmd/venti/srv/mkfile - 664 sys sys 1188622141 1032
+1189020603 72 a sys/src/cmd/venti/srv/part.c - 664 sys sys 1180244694 5662
+1189020603 73 a sys/src/cmd/venti/srv/png.c - 664 sys sys 1142736354 3729
+1189020603 74 a sys/src/cmd/venti/srv/printarena.c - 664 sys sys 1177189438 2673
+1189020603 75 a sys/src/cmd/venti/srv/printarenapart.c - 664 sys sys 1178160304 3544
+1189020603 76 a sys/src/cmd/venti/srv/printarenas.c - 664 sys sys 1142736355 2074
+1189020603 77 a sys/src/cmd/venti/srv/printindex.c - 664 sys sys 1142736355 1746
+1189020603 78 a sys/src/cmd/venti/srv/printmap.c - 664 sys sys 1142736355 542
+1189020603 79 a sys/src/cmd/venti/srv/rdarena.c - 664 sys sys 1178161030 1637
+1189020603 80 a sys/src/cmd/venti/srv/readifile.c - 664 sys sys 1177534667 411
+1189020603 81 a sys/src/cmd/venti/srv/reseal.c - 664 sys sys 1177189438 6682
+1189020603 82 a sys/src/cmd/venti/srv/round.c - 664 sys sys 1142736355 1577
+1189020603 83 a sys/src/cmd/venti/srv/score.c - 664 sys sys 1178160305 740
+1189020603 84 a sys/src/cmd/venti/srv/sortientry.c - 664 sys sys 1177189439 8325
+1189020603 85 a sys/src/cmd/venti/srv/stats.c - 664 sys sys 1177189439 3912
+1189020603 86 a sys/src/cmd/venti/srv/stdinc.h - 664 sys sys 1177189439 169
+1189020603 87 a sys/src/cmd/venti/srv/syncarena.c - 664 sys sys 1177249927 4834
+1189020603 88 a sys/src/cmd/venti/srv/syncindex.c - 664 sys sys 1177249927 1622
+1189020603 89 a sys/src/cmd/venti/srv/syncindex0.c - 664 sys sys 1177249927 4447
+1189020603 90 a sys/src/cmd/venti/srv/trace.c - 664 sys sys 1142736356 709
+1189020603 91 a sys/src/cmd/venti/srv/unittoull.c - 664 sys sys 1142736356 471
+1189020603 92 a sys/src/cmd/venti/srv/unwhack.c - 664 sys sys 1142736356 3191
+1189020603 93 a sys/src/cmd/venti/srv/utils.c - 664 sys sys 1178160305 3755
+1189020603 94 a sys/src/cmd/venti/srv/venti.c - 664 sys sys 1188624404 5882
+1189020603 95 a sys/src/cmd/venti/srv/verifyarena.c - 664 sys sys 1178160305 5666
+1189020603 96 a sys/src/cmd/venti/srv/whack.c - 664 sys sys 1142736357 6419
+1189020603 97 a sys/src/cmd/venti/srv/whack.h - 664 sys sys 1142736357 966
+1189020603 98 a sys/src/cmd/venti/srv/wrarena.c - 664 sys sys 1183678902 4647
+1189020603 99 a sys/src/cmd/venti/srv/www - 20000000775 sys sys 1189019173 0
+1189020603 100 a sys/src/cmd/venti/srv/www/stats.html - 664 sys sys 1177190826 869
+1189020603 101 a sys/src/cmd/venti/srv/www/stats.js - 664 sys sys 1177190826 9427
+1189020603 102 a sys/src/cmd/venti/srv/www/status.js - 664 sys sys 1177190826 452
+1189020603 103 a sys/src/cmd/venti/srv/www/status1.js - 664 sys sys 1177190826 419
+1189020603 104 a sys/src/cmd/venti/srv/xml.c - 664 sys sys 1142736357 2236
+1189020603 105 a sys/src/cmd/venti/srv/xml.h - 664 sys sys 1142736357 450
+1189020603 106 a sys/src/cmd/venti/srv/zblock.c - 664 sys sys 1178160305 1659
+1189020603 107 a sys/src/cmd/venti/srv/zeropart.c - 664 sys sys 1178160305 707
+1189020603 108 c sys/src/cmd/venti/sync.c - 664 sys sys 1177189440 726
+1189020603 109 c sys/src/cmd/venti/write.c - 664 sys sys 1177189440 1106
+1189020603 110 c sys/src/cmd/fossil/mkfile - 664 sys sys 1189020178 2641
+1189020603 111 c sys/src/cmd/fossil/stdinc.h - 664 sys sys 1189020178 156
+1189020603 112 a sys/src/cmd/oventi - 20000000775 sys sys 1189019154 0
+1189020603 113 a sys/src/cmd/oventi/README - 664 sys sys 1189018077 63
+1189020603 114 a sys/src/cmd/oventi/backup.example - 775 sys sys 1045503662 521
+1189020603 115 a sys/src/cmd/oventi/conf.rc - 775 sys sys 1055707446 1416
+1189020603 116 a sys/src/cmd/oventi/copy.c - 664 sys sys 1158618728 3713
+1189020603 117 a sys/src/cmd/oventi/dat.h - 664 sys sys 1128337707 15346
+1189020603 118 a sys/src/cmd/oventi/dumpvacroots - 775 sys sys 1163468045 571
+1189020603 119 a sys/src/cmd/oventi/fns.h - 664 sys sys 1055707422 6793
+1189020603 120 a sys/src/cmd/oventi/mkfile - 664 sys sys 1189018610 256
+1189020603 121 a sys/src/cmd/oventi/notes - 664 sys sys 1068500911 4032
+1189020603 122 a sys/src/cmd/oventi/stdinc.h - 664 sys sys 1188621931 140
+1189020603 123 a sys/src/cmd/oventi/venti.conf - 664 sys sys 1019867537 397
+1189020603 124 a sys/src/cmd/oventi/wrtape - 775 sys sys 1019678881 555
+1189020603 125 a sys/src/liboventi - 20000000775 sys sys 1189019654 0
+1189020603 126 a sys/src/liboventi/client.8 - 664 sys sys 1188621755 11972
+1189020603 127 a sys/src/liboventi/client.c - 664 sys sys 1188621652 5494
+1189020603 128 a sys/src/liboventi/debug.8 - 664 sys sys 1188621755 3582
+1189020603 129 a sys/src/liboventi/debug.c - 664 sys sys 1188621652 1259
+1189020603 130 a sys/src/liboventi/errfmt.8 - 664 sys sys 1188621755 449
+1189020603 131 a sys/src/liboventi/errfmt.c - 664 sys sys 1188621652 134
+1189020603 132 a sys/src/liboventi/fatal.8 - 664 sys sys 1188621755 778
+1189020603 133 a sys/src/liboventi/fatal.c - 664 sys sys 1188621652 226
+1189020603 134 a sys/src/liboventi/mkfile - 664 sys sys 1188621776 577
+1189020603 135 a sys/src/liboventi/pack.8 - 664 sys sys 1188621755 5477
+1189020603 136 a sys/src/liboventi/pack.c - 664 sys sys 1188621652 2852
+1189020603 137 a sys/src/liboventi/packet.8 - 664 sys sys 1188621755 24906
+1189020603 138 a sys/src/liboventi/packet.c - 664 sys sys 1188621652 13229
+1189020603 139 a sys/src/liboventi/packet.h - 664 sys sys 1019678692 641
+1189020603 140 a sys/src/liboventi/parsescore.8 - 664 sys sys 1188621755 1208
+1189020603 141 a sys/src/liboventi/parsescore.c - 664 sys sys 1188621652 517
+1189020603 142 a sys/src/liboventi/plan9-io.8 - 664 sys sys 1188621756 3811
+1189020603 143 a sys/src/liboventi/plan9-io.c - 664 sys sys 1188621652 1759
+1189020603 144 a sys/src/liboventi/plan9-sha1.8 - 664 sys sys 1188621756 2021
+1189020603 145 a sys/src/liboventi/plan9-sha1.c - 664 sys sys 1188621652 1059
+1189020603 146 a sys/src/liboventi/plan9-thread.8 - 664 sys sys 1188621756 9994
+1189020603 147 a sys/src/liboventi/plan9-thread.acid - 664 sys sys 1138756224 9254
+1189020603 148 a sys/src/liboventi/plan9-thread.c - 664 sys sys 1188621652 6714
+1189020603 149 a sys/src/liboventi/readfully.8 - 664 sys sys 1188621755 740
+1189020603 150 a sys/src/liboventi/readfully.c - 664 sys sys 1188621652 238
+1189020603 151 a sys/src/liboventi/rpc.8 - 664 sys sys 1188621755 16009
+1189020603 152 a sys/src/liboventi/rpc.c - 664 sys sys 1188621652 7297
+1189020603 153 a sys/src/liboventi/scorefmt.8 - 664 sys sys 1188621755 862
+1189020603 154 a sys/src/liboventi/scorefmt.c - 664 sys sys 1188621652 256
+1189020603 155 a sys/src/liboventi/server.8 - 664 sys sys 1188621756 10569
+1189020603 156 a sys/src/liboventi/server.c - 664 sys sys 1188621652 4508
+1189020603 157 a sys/src/liboventi/session.h - 664 sys sys 1063853749 936
+1189020603 158 a sys/src/liboventi/strdup.8 - 664 sys sys 1188621756 640
+1189020603 159 a sys/src/liboventi/strdup.c - 664 sys sys 1188621652 204
+1189020603 160 a sys/src/liboventi/venti.txt - 664 sys sys 1045502097 4347
+1189020603 161 a sys/src/liboventi/zero.8 - 664 sys sys 1188621756 3268
+1189020603 162 a sys/src/liboventi/zero.c - 664 sys sys 1188621652 1510
+1189020603 163 a sys/src/libventi/cache.acid - 664 sys sys 1177189440 11960
+1189020603 164 a sys/src/libventi/cache.c - 664 sys sys 1177189440 11925
+1189020603 165 c sys/src/libventi/client.c - 664 sys sys 1177189440 3197
+1189020603 166 a sys/src/libventi/conn.c - 664 sys sys 1177189440 895
+1189020603 167 a sys/src/libventi/cvt.h - 664 sys sys 1142736171 610
+1189020603 168 c sys/src/libventi/debug.c - 664 sys sys 1177189440 201
+1189020603 169 a sys/src/libventi/debugpacket.c - 664 sys sys 1177189441 3838
+1189020603 170 a sys/src/libventi/dial.c - 664 sys sys 1177189441 378
+1189020603 171 a sys/src/libventi/dtype.c - 664 sys sys 1177189441 1117
+1189020603 172 a sys/src/libventi/entry.c - 664 sys sys 1177189441 1779
+1189020603 173 a sys/src/libventi/fcall.c - 664 sys sys 1177189441 3765
+1189020603 174 a sys/src/libventi/fcallfmt.c - 664 sys sys 1177189441 1912
+1189020603 175 a sys/src/libventi/file.c - 664 sys sys 1177189441 23509
+1189020603 176 a sys/src/libventi/hangup.c - 664 sys sys 1177189441 547
+1189020603 177 a sys/src/libventi/log.c - 664 sys sys 1179957535 3742
+1189020603 178 a sys/src/libventi/mem.c - 664 sys sys 1177189441 1184
+1189020603 179 c sys/src/libventi/mkfile - 664 sys sys 1188621815 512
+1189020603 180 a sys/src/libventi/packet.acid - 664 sys sys 1143389340 21446
+1189020603 181 c sys/src/libventi/packet.c - 664 sys sys 1177189441 15894
+1189020603 182 c sys/src/libventi/parsescore.c - 664 sys sys 1177189441 719
+1189020603 183 a sys/src/libventi/queue.c - 664 sys sys 1177189441 1571
+1189020603 184 a sys/src/libventi/queue.h - 664 sys sys 1177189441 233
+1189020603 185 a sys/src/libventi/root.c - 664 sys sys 1177189441 1218
+1189020603 186 a sys/src/libventi/rpc.acid - 664 sys sys 1143491745 12592
+1189020603 187 c sys/src/libventi/rpc.c - 664 sys sys 1177189442 3174
+1189020603 188 c sys/src/libventi/scorefmt.c - 664 sys sys 1177189442 248
+1189020603 189 a sys/src/libventi/send.c - 664 sys sys 1177189442 4395
+1189020603 190 c sys/src/libventi/server.c - 664 sys sys 1179957527 3693
+1189020603 191 a sys/src/libventi/srvhello.c - 664 sys sys 1177189442 833
+1189020603 192 c sys/src/libventi/strdup.c - 664 sys sys 1177189442 201
+1189020603 193 a sys/src/libventi/string.c - 664 sys sys 1177189442 737
+1189020603 194 a sys/src/libventi/time.c - 664 sys sys 1177189442 497
+1189020603 195 a sys/src/libventi/version.c - 664 sys sys 1177189442 2174
+1189020603 196 c sys/src/libventi/zero.c - 664 sys sys 1177189442 899
+1189020603 197 a sys/src/libventi/zeroscore.c - 664 sys sys 1177189442 248
+1189020603 198 d sys/src/libventi/venti.txt - 664 sys sys 1045502097 0
+1189020603 199 d sys/src/libventi/session.h - 664 sys sys 1063853749 0
+1189020603 200 d sys/src/libventi/readfully.c - 664 sys sys 1045502095 0
+1189020603 201 d sys/src/libventi/plan9-thread.c - 664 sys sys 1135487955 0
+1189020603 202 d sys/src/libventi/plan9-sha1.c - 664 sys sys 1045502095 0
+1189020603 203 d sys/src/libventi/plan9-io.c - 664 sys sys 1135487933 0
+1189020603 204 d sys/src/libventi/packet.h - 664 sys sys 1019678692 0
+1189020603 205 d sys/src/libventi/pack.c - 664 sys sys 1045502094 0
+1189020603 206 d sys/src/libventi/fatal.c - 664 sys sys 1084468118 0
+1189020603 207 d sys/src/libventi/errfmt.c - 664 sys sys 1019678691 0
+1189020603 208 d sys/src/cmd/venti/zeropart.c - 664 sys sys 1132452194 0
+1189020603 209 d sys/src/cmd/venti/xml.h - 664 sys sys 1019678881 0
+1189020603 210 d sys/src/cmd/venti/xml.c - 664 sys sys 1091904425 0
+1189020603 211 d sys/src/cmd/venti/wrtape - 775 sys sys 1019678881 0
+1189020603 212 d sys/src/cmd/venti/wrarena.c - 664 sys sys 1038536023 0
+1189020603 213 d sys/src/cmd/venti/whack.h - 664 sys sys 1019678881 0
+1189020603 214 d sys/src/cmd/venti/whack.c - 664 sys sys 1019678881 0
+1189020603 215 d sys/src/cmd/venti/verifyarena.c - 664 sys sys 1019678881 0
+1189020603 216 d sys/src/cmd/venti/ventifs.c - 664 sys sys 1063854129 0
+1189020603 217 d sys/src/cmd/venti/venti.conf - 664 sys sys 1019867537 0
+1189020603 218 d sys/src/cmd/venti/venti.c - 664 sys sys 1069101830 0
+1189020603 219 d sys/src/cmd/venti/utils.c - 664 sys sys 1127527222 0
+1189020603 220 d sys/src/cmd/venti/unwhack.c - 664 sys sys 1019678881 0
+1189020603 221 d sys/src/cmd/venti/unittoull.c - 664 sys sys 1019678881 0
+1189020603 222 d sys/src/cmd/venti/syncindex0.c - 664 sys sys 1036470283 0
+1189020603 223 d sys/src/cmd/venti/syncindex.c - 664 sys sys 1055707433 0
+1189020603 224 d sys/src/cmd/venti/syncarena.c - 664 sys sys 1183441016 0
+1189020603 225 d sys/src/cmd/venti/stdinc.h - 664 sys sys 1019678880 0
+1189020603 226 d sys/src/cmd/venti/stats.c - 664 sys sys 1019678880 0
+1189020603 227 d sys/src/cmd/venti/sortientry.c - 664 sys sys 1143759340 0
+1189020603 228 d sys/src/cmd/venti/score.c - 664 sys sys 1045503655 0
+1189020603 229 d sys/src/cmd/venti/rdarena.c - 664 sys sys 1055707432 0
+1189020603 230 d sys/src/cmd/venti/printarena.c - 664 sys sys 1109511493 0
+1189020603 231 d sys/src/cmd/venti/part.c - 664 sys sys 1036389637 0
+1189020603 232 d sys/src/cmd/venti/notes - 664 sys sys 1068500911 0
+1189020603 233 d sys/src/cmd/venti/mkxml.elems - 775 sys sys 1019678880 0
+1189020603 234 d sys/src/cmd/venti/mkxml - 775 sys sys 1019678879 0
+1189020603 235 d sys/src/cmd/venti/lumpqueue.c - 664 sys sys 1168307536 0
+1189020603 236 d sys/src/cmd/venti/lumpcache.c - 664 sys sys 1019678879 0
+1189020603 237 d sys/src/cmd/venti/lump.c - 664 sys sys 1055707441 0
+1189020603 238 d sys/src/cmd/venti/index.c - 664 sys sys 1045503654 0
+1189020603 239 d sys/src/cmd/venti/ifile.c - 664 sys sys 1055707440 0
+1189020603 240 d sys/src/cmd/venti/icache.c - 664 sys sys 1091904425 0
+1189020603 241 d sys/src/cmd/venti/httpd.c - 664 sys sys 1045503654 0
+1189020603 242 d sys/src/cmd/venti/fns.h - 664 sys sys 1055707422 0
+1189020603 243 d sys/src/cmd/venti/fmtisect.c - 664 sys sys 1132452192 0
+1189020603 244 d sys/src/cmd/venti/fmtindex.c - 664 sys sys 1138471072 0
+1189020603 245 d sys/src/cmd/venti/fmtarenas.c - 664 sys sys 1132452192 0
+1189020603 246 d sys/src/cmd/venti/findscore.c - 664 sys sys 1121977913 0
+1189020603 247 d sys/src/cmd/venti/dumpvacroots - 775 sys sys 1167777001 0
+1189020603 248 d sys/src/cmd/venti/dumparena.c - 664 sys sys 1019678878 0
+1189020603 249 d sys/src/cmd/venti/dump.c - 664 sys sys 1068520313 0
+1189020603 250 d sys/src/cmd/venti/dcache.c - 664 sys sys 1019678878 0
+1189020603 251 d sys/src/cmd/venti/dat.h - 664 sys sys 1132452191 0
+1189020603 252 d sys/src/cmd/venti/conv.c - 664 sys sys 1019678878 0
+1189020603 253 d sys/src/cmd/venti/config.c - 664 sys sys 1138471074 0
+1189020603 254 d sys/src/cmd/venti/conf.rc - 775 sys sys 1055707446 0
+1189020603 255 d sys/src/cmd/venti/clumpstats.c - 664 sys sys 1055707430 0
+1189020603 256 d sys/src/cmd/venti/clump.c - 664 sys sys 1019678877 0
+1189020603 257 d sys/src/cmd/venti/checkindex.c - 664 sys sys 1143759337 0
+1189020603 258 d sys/src/cmd/venti/checkarenas.c - 664 sys sys 1019854295 0
+1189020603 259 d sys/src/cmd/venti/buildindex.c - 664 sys sys 1143759340 0
+1189020603 260 d sys/src/cmd/venti/buildbuck.c - 664 sys sys 1019678877 0
+1189020603 261 d sys/src/cmd/venti/backup.example - 775 sys sys 1045503662 0
+1189020603 262 d sys/src/cmd/venti/arenas.c - 664 sys sys 1063854192 0
+1189020603 263 d sys/src/cmd/venti/arena.c - 664 sys sys 1045503653 0
+1189020603 264 d sys/man/8/ventiaux - 664 sys sys 1159419552 0
+1189024204 0 c 386/bin/aux/na - 775 sys sys 1189023884 154372
+1189029603 0 c sys/man/4/cwfs - 664 sys sys 1189029640 6255
+1189029603 1 c sys/src/cmd/cwfs/main.c - 664 sys sys 1189029628 9977
+1189033207 0 c 386/bin/cwfs - 775 sys sys 1189032952 365566
+1189033207 1 c sys/src/cmd/cwfs/main.c - 664 sys sys 1189033288 10146
+1189035005 0 c 386/bin/cwfs - 775 sys sys 1189033352 365605
+1189049404 0 c 386/bin/cwfs - 775 sys sys 1189048120 365605
+1189049404 1 c 386/lib/libventi.a - 664 sys sys 1189048123 189448
+1189049404 2 c sys/src/cmd/aquarela/nblistener.c - 664 sys sys 1189049390 687
+1189049404 3 c sys/src/mkfile - 664 sys sys 1189049203 1017

+ 271 - 0
sys/include/oventi.h

@@ -0,0 +1,271 @@
+#pragma	lib	"liboventi.a"
+#pragma	src	"/sys/src/liboventi"
+
+typedef struct VtSession	VtSession;
+typedef struct VtSha1		VtSha1;
+typedef struct Packet		Packet;
+typedef struct VtLock 		VtLock;
+typedef struct VtRendez		VtRendez;
+typedef struct VtRoot		VtRoot;
+typedef struct VtEntry		VtEntry;
+typedef struct VtServerVtbl	VtServerVtbl;
+
+#pragma incomplete VtSession
+#pragma incomplete VtSha1
+#pragma incomplete Packet
+#pragma incomplete VtLock
+#pragma incomplete VtRendez
+
+enum {
+	VtScoreSize	= 20, /* Venti */
+	VtMaxLumpSize	= 56*1024,
+	VtPointerDepth	= 7,	
+	VtEntrySize	= 40,
+	VtRootSize 	= 300,
+	VtMaxStringSize	= 1000,
+	VtAuthSize 	= 1024,  /* size of auth group - in bits - must be multiple of 8 */
+	MaxFragSize 	= 9*1024,
+	VtMaxFileSize	= (1ULL<<48) - 1,
+	VtRootVersion	= 2,
+};
+
+/* crypto strengths */
+enum {
+	VtCryptoStrengthNone,
+	VtCryptoStrengthAuth,
+	VtCryptoStrengthWeak,
+	VtCryptoStrengthStrong,
+};
+
+/* crypto suites */
+enum {
+	VtCryptoNone,
+	VtCryptoSSL3,
+	VtCryptoTLS1,
+
+	VtCryptoMax
+};
+
+/* codecs */
+enum {
+	VtCodecNone,
+
+	VtCodecDeflate,
+	VtCodecThwack,
+
+	VtCodecMax
+};
+
+/* Lump Types */
+enum {
+	VtErrType,		/* illegal */
+
+	VtRootType,
+	VtDirType,
+	VtPointerType0,
+	VtPointerType1,
+	VtPointerType2,
+	VtPointerType3,
+	VtPointerType4,
+	VtPointerType5,
+	VtPointerType6,
+	VtPointerType7,		/* not used */
+	VtPointerType8,		/* not used */
+	VtPointerType9,		/* not used */
+	VtDataType,
+
+	VtMaxType
+};
+
+/* Dir Entry flags */
+enum {
+	VtEntryActive = (1<<0),		/* entry is in use */
+	VtEntryDir = (1<<1),		/* a directory */
+	VtEntryDepthShift = 2,		/* shift for pointer depth */
+	VtEntryDepthMask = (0x7<<2),	/* mask for pointer depth */
+	VtEntryLocal = (1<<5),		/* used for local storage: should not be set for Venti blocks */
+	VtEntryNoArchive = (1<<6),	/* used for local storage: should not be set for Venti blocks */
+};
+
+struct VtRoot {
+	ushort version;
+	char name[128];
+	char type[128];
+	uchar score[VtScoreSize];	/* to a Dir block */
+	ushort blockSize;		/* maximum block size */
+	uchar prev[VtScoreSize];	/* last root block */
+};
+
+struct VtEntry {
+	ulong gen;			/* generation number */
+	ushort psize;			/* pointer block size */
+	ushort dsize;			/* data block size */
+	uchar depth;			/* unpacked from flags */
+	uchar flags;
+	uvlong size;
+	uchar score[VtScoreSize];
+};
+
+struct VtServerVtbl {
+	Packet *(*read)(VtSession*, uchar score[VtScoreSize], int type, int n);
+	int (*write)(VtSession*, uchar score[VtScoreSize], int type, Packet *p);
+	void (*closing)(VtSession*, int clean);
+	void (*sync)(VtSession*);
+};
+
+/* versions */
+enum {
+	/* experimental versions */
+	VtVersion01 = 1,
+	VtVersion02,
+};
+
+/* score of zero length block */
+extern uchar vtZeroScore[VtScoreSize];	
+
+/* both sides */
+void vtAttach(void);
+void vtDetach(void);
+void vtClose(VtSession *s);
+void vtFree(VtSession *s);
+char *vtGetUid(VtSession *s);
+char *vtGetSid(VtSession *s);
+int vtSetDebug(VtSession *s, int);
+int vtGetDebug(VtSession *s);
+int vtSetFd(VtSession *s, int fd);
+int vtGetFd(VtSession *s);
+int vtConnect(VtSession *s, char *password);
+int vtSetCryptoStrength(VtSession *s, int);
+int vtGetCryptoStrength(VtSession *s);
+int vtSetCompression(VtSession *s, int);
+int vtGetCompression(VtSession *s);
+int vtGetCrypto(VtSession *s);
+int vtGetCodec(VtSession *s);
+char *vtGetVersion(VtSession *s);
+char *vtGetError(void);
+int vtErrFmt(Fmt *fmt);
+void vtDebug(VtSession*, char *, ...);
+void vtDebugMesg(VtSession *z, Packet *p, char *s);
+
+/* internal */
+VtSession *vtAlloc(void);
+void vtReset(VtSession*);
+int vtAddString(Packet*, char*);
+int vtGetString(Packet*, char**);
+int vtSendPacket(VtSession*, Packet*);
+Packet *vtRecvPacket(VtSession*);
+void vtDisconnect(VtSession*, int);
+int vtHello(VtSession*);
+
+/* client side */
+VtSession *vtClientAlloc(void);
+VtSession *vtDial(char *server, int canfail);
+int vtRedial(VtSession*, char *server);
+VtSession *vtStdioServer(char *server);
+int vtPing(VtSession *s);
+int vtSetUid(VtSession*, char *uid);
+int vtRead(VtSession*, uchar score[VtScoreSize], int type, uchar *buf, int n);
+int vtWrite(VtSession*, uchar score[VtScoreSize], int type, uchar *buf, int n);
+Packet *vtReadPacket(VtSession*, uchar score[VtScoreSize], int type, int n);
+int vtWritePacket(VtSession*, uchar score[VtScoreSize], int type, Packet *p);
+int vtSync(VtSession *s);
+
+int vtZeroExtend(int type, uchar *buf, int n, int nn);
+int vtZeroTruncate(int type, uchar *buf, int n);
+int vtParseScore(char*, uint, uchar[VtScoreSize]);
+
+void vtRootPack(VtRoot*, uchar*);
+int vtRootUnpack(VtRoot*, uchar*);
+void vtEntryPack(VtEntry*, uchar*, int index);
+int vtEntryUnpack(VtEntry*, uchar*, int index);
+
+/* server side */
+VtSession *vtServerAlloc(VtServerVtbl*);
+int vtSetSid(VtSession *s, char *sid);
+int vtExport(VtSession *s);
+
+/* sha1 */
+VtSha1* vtSha1Alloc(void);
+void vtSha1Free(VtSha1*);
+void vtSha1Init(VtSha1*);
+void vtSha1Update(VtSha1*, uchar *, int n);
+void vtSha1Final(VtSha1*, uchar sha1[VtScoreSize]);
+void vtSha1(uchar score[VtScoreSize], uchar *, int);
+int vtSha1Check(uchar score[VtScoreSize], uchar *, int);
+int vtScoreFmt(Fmt *fmt);
+
+/* Packet */
+Packet *packetAlloc(void);
+void packetFree(Packet*);
+Packet *packetForeign(uchar *buf, int n, void (*free)(void *a), void *a);
+Packet *packetDup(Packet*, int offset, int n);
+Packet *packetSplit(Packet*, int n);
+int packetConsume(Packet*, uchar *buf, int n);
+int packetTrim(Packet*, int offset, int n);
+uchar *packetHeader(Packet*, int n);
+uchar *packetTrailer(Packet*, int n);
+int packetPrefix(Packet*, uchar *buf, int n);
+int packetAppend(Packet*, uchar *buf, int n);
+int packetConcat(Packet*, Packet*);
+uchar *packetPeek(Packet*, uchar *buf, int offset, int n);
+int packetCopy(Packet*, uchar *buf, int offset, int n);
+int packetFragments(Packet*, IOchunk*, int nio, int offset);
+int packetSize(Packet*);
+int packetAllocatedSize(Packet*);
+void packetSha1(Packet*, uchar sha1[VtScoreSize]);
+int packetCompact(Packet*);
+int packetCmp(Packet*, Packet*);
+void packetStats(void);
+
+/* portability stuff - should be a seperate library */
+
+void vtMemFree(void *);
+void *vtMemAlloc(int);
+void *vtMemAllocZ(int);
+void *vtMemRealloc(void *p, int);
+void *vtMemBrk(int n);
+char *vtStrDup(char *);
+void vtFatal(char *, ...);
+char *vtGetError(void);
+char *vtSetError(char *, ...);
+char *vtOSError(void);
+
+/* locking/threads */
+int vtThread(void (*f)(void*), void *rock);
+void vtThreadSetName(char*);
+
+VtLock *vtLockAlloc(void);
+/* void vtLockInit(VtLock**); */
+void vtLock(VtLock*);
+int vtCanLock(VtLock*);
+void vtRLock(VtLock*);
+int vtCanRLock(VtLock*);
+void vtUnlock(VtLock*);
+void vtRUnlock(VtLock*);
+void vtLockFree(VtLock*);
+
+VtRendez *vtRendezAlloc(VtLock*);
+void vtRendezFree(VtRendez*);
+int vtSleep(VtRendez*);
+int vtWakeup(VtRendez*);
+int vtWakeupAll(VtRendez*);
+
+/* fd functions - really network (socket) functions */
+void vtFdClose(int);
+int vtFdRead(int, uchar*, int);
+int vtFdReadFully(int, uchar*, int);
+int vtFdWrite(int, uchar*, int);
+
+/*
+ * formatting
+ * other than noted, these formats all ignore
+ * the width and precision arguments, and all flags
+ *
+ * V	a venti score
+ * R	venti error
+ */
+#pragma	varargck	type	"V"		uchar*
+#pragma	varargck	type	"R"		void
+
+#pragma	varargck	argpos	vtSetError	1
+

+ 457 - 232
sys/include/venti.h

@@ -1,271 +1,496 @@
-#pragma	lib	"libventi.a"
-#pragma	src	"/sys/src/libventi"
-
-typedef struct VtSession	VtSession;
-typedef struct VtSha1		VtSha1;
-typedef struct Packet		Packet;
-typedef struct VtLock 		VtLock;
-typedef struct VtRendez		VtRendez;
-typedef struct VtRoot		VtRoot;
-typedef struct VtEntry		VtEntry;
-typedef struct VtServerVtbl	VtServerVtbl;
-
-#pragma incomplete VtSession
-#pragma incomplete VtSha1
+#pragma lib "libventi.a"
+#pragma src "/sys/src/libventi"
+
+
+/* XXX should be own library? */
+/*
+ * Packets
+ */
+enum
+{
+	MaxFragSize = 9*1024
+};
+
+typedef struct Packet Packet;
 #pragma incomplete Packet
-#pragma incomplete VtLock
-#pragma incomplete VtRendez
 
-enum {
-	VtScoreSize	= 20, /* Venti */
+Packet*	packetalloc(void);
+void	packetappend(Packet*, uchar *buf, int n);
+uint	packetasize(Packet*);
+int	packetcmp(Packet*, Packet*);
+int	packetcompact(Packet*);
+void	packetconcat(Packet*, Packet*);
+int	packetconsume(Packet*, uchar *buf, int n);
+int	packetcopy(Packet*, uchar *buf, int offset, int n);
+Packet*	packetdup(Packet*, int offset, int n);
+Packet*	packetforeign(uchar *buf, int n, void (*free)(void *a), void *a);
+int	packetfragments(Packet*, IOchunk*, int nio, int offset);
+void	packetfree(Packet*);
+uchar*	packetheader(Packet*, int n);
+uchar*	packetpeek(Packet*, uchar *buf, int offset, int n);
+void	packetprefix(Packet*, uchar *buf, int n);
+void	packetsha1(Packet*, uchar sha1[20]);
+uint	packetsize(Packet*);
+Packet*	packetsplit(Packet*, int n);
+void	packetstats(void);
+uchar*	packettrailer(Packet*, int n);
+int	packettrim(Packet*, int offset, int n);
+
+/* XXX should be own library? */
+/*
+ * Logging
+ */
+typedef struct VtLog VtLog;
+typedef struct VtLogChunk VtLogChunk;
+
+struct VtLog
+{
+	VtLog	*next;		/* in hash table */
+	char	*name;
+	VtLogChunk *chunk;
+	uint	nchunk;
+	VtLogChunk *w;
+	QLock	lk;
+	int	ref;
+};
+
+struct VtLogChunk
+{
+	char	*p;
+	char	*ep;
+	char	*wp;
+};
+
+VtLog*	vtlogopen(char *name, uint size);
+void	vtlogprint(VtLog *log, char *fmt, ...);
+void	vtlog(char *name, char *fmt, ...);
+void	vtlogclose(VtLog*);
+void	vtlogremove(char *name);
+char**	vtlognames(int*);
+void	vtlogdump(int fd, VtLog*);
+
+/* XXX begin actual venti.h */
+
+typedef struct VtFcall VtFcall;
+typedef struct VtConn VtConn;
+typedef struct VtEntry VtEntry;
+typedef struct VtRoot VtRoot;
+
+/*
+ * Fundamental constants.
+ */
+enum
+{
+	VtScoreSize	= 20,
+	VtMaxStringSize = 1024,
 	VtMaxLumpSize	= 56*1024,
-	VtPointerDepth	= 7,	
-	VtEntrySize	= 40,
-	VtRootSize 	= 300,
-	VtMaxStringSize	= 1000,
-	VtAuthSize 	= 1024,  /* size of auth group - in bits - must be multiple of 8 */
-	MaxFragSize 	= 9*1024,
-	VtMaxFileSize	= (1ULL<<48) - 1,
-	VtRootVersion	= 2,
+	VtPointerDepth	= 7
+};
+#define VtMaxFileSize ((1ULL<<48)-1)
+
+
+/* 
+ * Strings in packets.
+ */
+int vtputstring(Packet*, char*);
+int vtgetstring(Packet*, char**);
+
+/*
+ * Block types.
+ * 
+ * The initial Venti protocol had a much
+ * less regular list of block types.
+ * VtToDiskType converts from new to old.
+ */
+enum
+{
+	VtDataType	= 0<<3,
+	/* VtDataType+1, ... */
+	VtDirType	= 1<<3,
+	/* VtDirType+1, ... */
+	VtRootType	= 2<<3,
+	VtMaxType,
+	VtCorruptType = 0xFF,
+
+	VtTypeDepthMask = 7,
+	VtTypeBaseMask = ~VtTypeDepthMask
+};
+
+/* convert to/from on-disk type numbers */
+uint vttodisktype(uint);
+uint vtfromdisktype(uint);
+
+/*
+ * VtEntry describes a Venti stream
+ *
+ * The _ enums are only used on the wire.
+ * They are not present in the VtEntry structure
+ * and should not be used by client programs.
+ * (The info is in the type field.)
+ */
+enum
+{
+	VtEntryActive = 1<<0,		/* entry is in use */
+	_VtEntryDir = 1<<1,		/* a directory */
+	_VtEntryDepthShift = 2,		/* shift for pointer depth */
+	_VtEntryDepthMask = 7<<2,	/* mask for pointer depth */
+	VtEntryLocal = 1<<5		/* for local storage only */
+};
+enum
+{
+	VtEntrySize = 40
+};
+struct VtEntry
+{
+	ulong	gen;			/* generation number */
+	ushort	psize;			/* pointer block size */
+	ushort	dsize;			/* data block size */
+	uchar	type;
+	uchar	flags;
+	uvlong	size;
+	uchar	score[VtScoreSize];
 };
 
-/* crypto strengths */
-enum {
+void vtentrypack(VtEntry*, uchar*, int index);
+int vtentryunpack(VtEntry*, uchar*, int index);
+
+struct VtRoot
+{
+	char	name[128];
+	char	type[128];
+	uchar	score[VtScoreSize];	/* to a Dir block */
+	ushort	blocksize;		/* maximum block size */
+	uchar	prev[VtScoreSize];	/* last root block */
+};
+
+enum
+{
+	VtRootSize = 300,
+	VtRootVersion = 2
+};
+
+void vtrootpack(VtRoot*, uchar*);
+int vtrootunpack(VtRoot*, uchar*);
+
+/*
+ * score of zero length block
+ */
+extern uchar vtzeroscore[VtScoreSize];
+
+/*
+ * zero extend and truncate blocks
+ */
+void vtzeroextend(int type, uchar *buf, uint n, uint nn);
+uint vtzerotruncate(int type, uchar *buf, uint n);
+
+/*
+ * parse score: mungs s
+ */
+int vtparsescore(char *s, char **prefix, uchar[VtScoreSize]);
+
+/*
+ * formatting
+ * other than noted, these formats all ignore
+ * the width and precision arguments, and all flags
+ *
+ * V	a venti score
+ */
+#pragma	varargck	type	"V"	uchar*
+#pragma	varargck	type	"F"	VtFcall*
+#pragma	varargck	type	"T"	void
+#pragma	varargck	type	"lT"	void
+
+int vtscorefmt(Fmt*);
+
+/*
+ * error-checking malloc et al.
+ */
+void	vtfree(void *);
+void*	vtmalloc(int);
+void*	vtmallocz(int);
+void*	vtrealloc(void *p, int);
+void*	vtbrk(int n);
+char*	vtstrdup(char *);
+
+/*
+ * Venti protocol
+ */
+
+/*
+ * Crypto strengths
+ */
+enum
+{
 	VtCryptoStrengthNone,
 	VtCryptoStrengthAuth,
 	VtCryptoStrengthWeak,
-	VtCryptoStrengthStrong,
+	VtCryptoStrengthStrong
 };
 
-/* crypto suites */
-enum {
+/*
+ * Crypto suites
+ */
+enum
+{
 	VtCryptoNone,
 	VtCryptoSSL3,
 	VtCryptoTLS1,
-
 	VtCryptoMax
 };
 
-/* codecs */
-enum {
+/* 
+ * Codecs
+ */
+enum
+{
 	VtCodecNone,
-
 	VtCodecDeflate,
 	VtCodecThwack,
-
 	VtCodecMax
 };
 
-/* Lump Types */
-enum {
-	VtErrType,		/* illegal */
-
-	VtRootType,
-	VtDirType,
-	VtPointerType0,
-	VtPointerType1,
-	VtPointerType2,
-	VtPointerType3,
-	VtPointerType4,
-	VtPointerType5,
-	VtPointerType6,
-	VtPointerType7,		/* not used */
-	VtPointerType8,		/* not used */
-	VtPointerType9,		/* not used */
-	VtDataType,
-
-	VtMaxType
+enum
+{
+	VtRerror	= 1,
+	VtTping		= 2,
+	VtRping,
+	VtThello	= 4,
+	VtRhello,
+	VtTgoodbye	= 6,
+	VtRgoodbye,	/* not used */
+	VtTauth0	= 8,
+	VtRauth0,
+	VtTauth1	= 10,
+	VtRauth1,
+	VtTread		= 12,
+	VtRread,
+	VtTwrite	= 14,
+	VtRwrite,
+	VtTsync		= 16,
+	VtRsync,
+
+	VtTmax
 };
 
-/* Dir Entry flags */
-enum {
-	VtEntryActive = (1<<0),		/* entry is in use */
-	VtEntryDir = (1<<1),		/* a directory */
-	VtEntryDepthShift = 2,		/* shift for pointer depth */
-	VtEntryDepthMask = (0x7<<2),	/* mask for pointer depth */
-	VtEntryLocal = (1<<5),		/* used for local storage: should not be set for Venti blocks */
-	VtEntryNoArchive = (1<<6),	/* used for local storage: should not be set for Venti blocks */
+struct VtFcall
+{
+	uchar	msgtype;
+	uchar	tag;
+
+	char	*error;		/* Rerror */
+
+	char	*version;	/* Thello */
+	char	*uid;		/* Thello */
+	uchar	strength;	/* Thello */
+	uchar	*crypto;	/* Thello */
+	uint	ncrypto;	/* Thello */
+	uchar	*codec;		/* Thello */
+	uint	ncodec;		/* Thello */
+	char	*sid;		/* Rhello */
+	uchar	rcrypto;	/* Rhello */
+	uchar	rcodec;		/* Rhello */
+	uchar	*auth;		/* TauthX, RauthX */
+	uint	nauth;		/* TauthX, RauthX */
+	uchar	score[VtScoreSize];	/* Tread, Rwrite */
+	uchar	blocktype;	/* Tread, Twrite */
+	ushort	count;		/* Tread */
+	Packet	*data;		/* Rread, Twrite */
+};
+
+Packet*	vtfcallpack(VtFcall*);
+int	vtfcallunpack(VtFcall*, Packet*);
+void	vtfcallclear(VtFcall*);
+int	vtfcallfmt(Fmt*);
+
+enum
+{
+	VtStateAlloc,
+	VtStateConnected,
+	VtStateClosed
 };
 
-struct VtRoot {
-	ushort version;
-	char name[128];
-	char type[128];
-	uchar score[VtScoreSize];	/* to a Dir block */
-	ushort blockSize;		/* maximum block size */
-	uchar prev[VtScoreSize];	/* last root block */
+struct VtConn
+{
+	QLock	lk;
+	QLock	inlk;
+	QLock	outlk;
+	int	debug;
+	int	infd;
+	int	outfd;
+	int	muxer;
+	void	*writeq;
+	void	*readq;
+	int	state;
+	void	*wait[256];
+	uint	ntag;
+	uint	nsleep;
+	Packet	*part;
+	Rendez	tagrend;
+	Rendez	rpcfork;
+	char	*version;
+	char	*uid;
+	char	*sid;
+	char	addr[256];	/* address of other side */
 };
 
-struct VtEntry {
-	ulong gen;			/* generation number */
-	ushort psize;			/* pointer block size */
-	ushort dsize;			/* data block size */
-	uchar depth;			/* unpacked from flags */
-	uchar flags;
-	uvlong size;
-	uchar score[VtScoreSize];
+VtConn*	vtconn(int infd, int outfd);
+VtConn*	vtdial(char*);
+void	vtfreeconn(VtConn*);
+int	vtsend(VtConn*, Packet*);
+Packet*	vtrecv(VtConn*);
+int	vtversion(VtConn* z);
+void	vtdebug(VtConn* z, char*, ...);
+void	vthangup(VtConn* z);
+int	vtgoodbye(VtConn* z);
+
+/* #pragma varargck argpos vtdebug 2 */
+
+/* server */
+typedef struct VtSrv VtSrv;
+#pragma incomplete VtSrv
+typedef struct VtReq VtReq;
+struct VtReq
+{
+	VtFcall	tx;
+	VtFcall	rx;
+/* private */
+	VtSrv	*srv;
+	void	*sc;
 };
 
-struct VtServerVtbl {
-	Packet *(*read)(VtSession*, uchar score[VtScoreSize], int type, int n);
-	int (*write)(VtSession*, uchar score[VtScoreSize], int type, Packet *p);
-	void (*closing)(VtSession*, int clean);
-	void (*sync)(VtSession*);
+int	vtsrvhello(VtConn*);
+VtSrv*	vtlisten(char *addr);
+VtReq*	vtgetreq(VtSrv*);
+void	vtrespond(VtReq*);
+
+/* client */
+Packet*	vtrpc(VtConn*, Packet*);
+Packet*	_vtrpc(VtConn*, Packet*, VtFcall*);
+void	vtrecvproc(void*);	/* VtConn */
+void	vtsendproc(void*);	/* VtConn */
+
+int	vtconnect(VtConn*);
+int	vthello(VtConn*);
+int	vtread(VtConn*, uchar score[VtScoreSize], uint type, uchar *buf, int n);
+int	vtwrite(VtConn*, uchar score[VtScoreSize], uint type, uchar *buf, int n);
+Packet*	vtreadpacket(VtConn*, uchar score[VtScoreSize], uint type, int n);
+int	vtwritepacket(VtConn*, uchar score[VtScoreSize], uint type, Packet *p);
+int	vtsync(VtConn*);
+int	vtping(VtConn*);
+
+/*
+ * Data blocks and block cache.
+ */
+enum
+{
+	NilBlock = ~0
 };
 
-/* versions */
-enum {
-	/* experimental versions */
-	VtVersion01 = 1,
-	VtVersion02,
+typedef struct VtBlock VtBlock;
+typedef struct VtCache VtCache;
+#pragma incomplete VtCache
+
+struct VtBlock
+{
+	VtCache	*c;
+	QLock	lk;
+
+	uchar	*data;
+	uchar	score[VtScoreSize];
+	uchar	type;			/* BtXXX */
+
+	/* internal to cache */
+	int	nlock;
+	int	iostate;
+	int	ref;
+	u32int	heap;
+	VtBlock	*next;
+	VtBlock	**prev;
+	u32int	used;
+	u32int	used2;
+	u32int	addr;
+	uintptr	pc;
 };
 
-/* score of zero length block */
-extern uchar vtZeroScore[VtScoreSize];	
-
-/* both sides */
-void vtAttach(void);
-void vtDetach(void);
-void vtClose(VtSession *s);
-void vtFree(VtSession *s);
-char *vtGetUid(VtSession *s);
-char *vtGetSid(VtSession *s);
-int vtSetDebug(VtSession *s, int);
-int vtGetDebug(VtSession *s);
-int vtSetFd(VtSession *s, int fd);
-int vtGetFd(VtSession *s);
-int vtConnect(VtSession *s, char *password);
-int vtSetCryptoStrength(VtSession *s, int);
-int vtGetCryptoStrength(VtSession *s);
-int vtSetCompression(VtSession *s, int);
-int vtGetCompression(VtSession *s);
-int vtGetCrypto(VtSession *s);
-int vtGetCodec(VtSession *s);
-char *vtGetVersion(VtSession *s);
-char *vtGetError(void);
-int vtErrFmt(Fmt *fmt);
-void vtDebug(VtSession*, char *, ...);
-void vtDebugMesg(VtSession *z, Packet *p, char *s);
-
-/* internal */
-VtSession *vtAlloc(void);
-void vtReset(VtSession*);
-int vtAddString(Packet*, char*);
-int vtGetString(Packet*, char**);
-int vtSendPacket(VtSession*, Packet*);
-Packet *vtRecvPacket(VtSession*);
-void vtDisconnect(VtSession*, int);
-int vtHello(VtSession*);
-
-/* client side */
-VtSession *vtClientAlloc(void);
-VtSession *vtDial(char *server, int canfail);
-int vtRedial(VtSession*, char *server);
-VtSession *vtStdioServer(char *server);
-int vtPing(VtSession *s);
-int vtSetUid(VtSession*, char *uid);
-int vtRead(VtSession*, uchar score[VtScoreSize], int type, uchar *buf, int n);
-int vtWrite(VtSession*, uchar score[VtScoreSize], int type, uchar *buf, int n);
-Packet *vtReadPacket(VtSession*, uchar score[VtScoreSize], int type, int n);
-int vtWritePacket(VtSession*, uchar score[VtScoreSize], int type, Packet *p);
-int vtSync(VtSession *s);
-
-int vtZeroExtend(int type, uchar *buf, int n, int nn);
-int vtZeroTruncate(int type, uchar *buf, int n);
-int vtParseScore(char*, uint, uchar[VtScoreSize]);
-
-void vtRootPack(VtRoot*, uchar*);
-int vtRootUnpack(VtRoot*, uchar*);
-void vtEntryPack(VtEntry*, uchar*, int index);
-int vtEntryUnpack(VtEntry*, uchar*, int index);
-
-/* server side */
-VtSession *vtServerAlloc(VtServerVtbl*);
-int vtSetSid(VtSession *s, char *sid);
-int vtExport(VtSession *s);
-
-/* sha1 */
-VtSha1* vtSha1Alloc(void);
-void vtSha1Free(VtSha1*);
-void vtSha1Init(VtSha1*);
-void vtSha1Update(VtSha1*, uchar *, int n);
-void vtSha1Final(VtSha1*, uchar sha1[VtScoreSize]);
-void vtSha1(uchar score[VtScoreSize], uchar *, int);
-int vtSha1Check(uchar score[VtScoreSize], uchar *, int);
-int vtScoreFmt(Fmt *fmt);
-
-/* Packet */
-Packet *packetAlloc(void);
-void packetFree(Packet*);
-Packet *packetForeign(uchar *buf, int n, void (*free)(void *a), void *a);
-Packet *packetDup(Packet*, int offset, int n);
-Packet *packetSplit(Packet*, int n);
-int packetConsume(Packet*, uchar *buf, int n);
-int packetTrim(Packet*, int offset, int n);
-uchar *packetHeader(Packet*, int n);
-uchar *packetTrailer(Packet*, int n);
-int packetPrefix(Packet*, uchar *buf, int n);
-int packetAppend(Packet*, uchar *buf, int n);
-int packetConcat(Packet*, Packet*);
-uchar *packetPeek(Packet*, uchar *buf, int offset, int n);
-int packetCopy(Packet*, uchar *buf, int offset, int n);
-int packetFragments(Packet*, IOchunk*, int nio, int offset);
-int packetSize(Packet*);
-int packetAllocatedSize(Packet*);
-void packetSha1(Packet*, uchar sha1[VtScoreSize]);
-int packetCompact(Packet*);
-int packetCmp(Packet*, Packet*);
-void packetStats(void);
-
-/* portability stuff - should be a seperate library */
-
-void vtMemFree(void *);
-void *vtMemAlloc(int);
-void *vtMemAllocZ(int);
-void *vtMemRealloc(void *p, int);
-void *vtMemBrk(int n);
-char *vtStrDup(char *);
-void vtFatal(char *, ...);
-char *vtGetError(void);
-char *vtSetError(char *, ...);
-char *vtOSError(void);
-
-/* locking/threads */
-int vtThread(void (*f)(void*), void *rock);
-void vtThreadSetName(char*);
-
-VtLock *vtLockAlloc(void);
-/* void vtLockInit(VtLock**); */
-void vtLock(VtLock*);
-int vtCanLock(VtLock*);
-void vtRLock(VtLock*);
-int vtCanRLock(VtLock*);
-void vtUnlock(VtLock*);
-void vtRUnlock(VtLock*);
-void vtLockFree(VtLock*);
-
-VtRendez *vtRendezAlloc(VtLock*);
-void vtRendezFree(VtRendez*);
-int vtSleep(VtRendez*);
-int vtWakeup(VtRendez*);
-int vtWakeupAll(VtRendez*);
-
-/* fd functions - really network (socket) functions */
-void vtFdClose(int);
-int vtFdRead(int, uchar*, int);
-int vtFdReadFully(int, uchar*, int);
-int vtFdWrite(int, uchar*, int);
+u32int	vtglobaltolocal(uchar[VtScoreSize]);
+void	vtlocaltoglobal(u32int, uchar[VtScoreSize]);
+
+VtCache*vtcachealloc(VtConn*, int blocksize, ulong nblocks);
+void	vtcachefree(VtCache*);
+VtBlock*vtcachelocal(VtCache*, u32int addr, int type);
+VtBlock*vtcacheglobal(VtCache*, uchar[VtScoreSize], int type);
+VtBlock*vtcacheallocblock(VtCache*, int type);
+void	vtcachesetwrite(VtCache*,
+	int(*)(VtConn*, uchar[VtScoreSize], uint, uchar*, int));
+void	vtblockput(VtBlock*);
+u32int	vtcacheblocksize(VtCache*);
+int	vtblockwrite(VtBlock*);
+VtBlock*vtblockcopy(VtBlock*);
+void	vtblockduplock(VtBlock*);
+
+extern int vtcachencopy, vtcachenread, vtcachenwrite;
+extern int vttracelevel;
 
 /*
- * formatting
- * other than noted, these formats all ignore
- * the width and precision arguments, and all flags
- *
- * V	a venti score
- * R	venti error
+ * Hash tree file tree.
  */
-#pragma	varargck	type	"V"		uchar*
-#pragma	varargck	type	"R"		void
+typedef struct VtFile VtFile;
+struct VtFile
+{
+	QLock	lk;
+	int	ref;
+	int	local;
+	VtBlock	*b;			/* block containing this file */
+	uchar	score[VtScoreSize];	/* score of block containing this file */
+
+/* immutable */
+	VtCache	*c;
+	int	mode;
+	u32int	gen;
+	int	dsize;
+	int	psize;
+	int	dir;
+	VtFile	*parent;
+	int	epb;			/* entries per block in parent */
+	u32int	offset; 		/* entry offset in parent */
+};
 
-#pragma	varargck	argpos	vtSetError	1
+enum
+{
+	VtOREAD,
+	VtOWRITE,
+	VtORDWR
+};
 
+VtBlock*vtfileblock(VtFile*, u32int, int mode);
+int	vtfileblockscore(VtFile*, u32int, uchar[VtScoreSize]);
+void	vtfileclose(VtFile*);
+VtFile*	_vtfilecreate(VtFile*, int offset, int psize, int dsize, int dir);
+VtFile*	vtfilecreate(VtFile*, int psize, int dsize, int dir);
+VtFile*	vtfilecreateroot(VtCache*, int psize, int dsize, int type);
+int	vtfileflush(VtFile*);
+int	vtfileflushbefore(VtFile*, u64int);
+u32int	vtfilegetdirsize(VtFile*);
+int	vtfilegetentry(VtFile*, VtEntry*);
+uvlong	vtfilegetsize(VtFile*);
+void	vtfileincref(VtFile*);
+int	vtfilelock2(VtFile*, VtFile*, int);
+int	vtfilelock(VtFile*, int);
+VtFile*	vtfileopen(VtFile*, u32int, int);
+VtFile*	vtfileopenroot(VtCache*, VtEntry*);
+long	vtfileread(VtFile*, void*, long, vlong);
+int	vtfileremove(VtFile*);
+int	vtfilesetdirsize(VtFile*, u32int);
+int	vtfilesetentry(VtFile*, VtEntry*);
+int	vtfilesetsize(VtFile*, u64int);
+int	vtfiletruncate(VtFile*);
+void	vtfileunlock(VtFile*);
+long	vtfilewrite(VtFile*, void*, long, vlong);
+
+int	vttimefmt(Fmt*);
+
+extern int chattyventi;
+extern int ventidoublechecksha1;
+extern int ventilogging;
+
+extern char *VtServerLog;

+ 158 - 0
sys/man/1/venti

@@ -0,0 +1,158 @@
+.TH VENTI 1
+.SH NAME
+read, write, copy \- simple Venti clients
+.SH SYNOPSIS
+.B venti/read
+[
+.B -h
+.I host
+]
+[
+.B -t
+.I type
+]
+.I score
+.br
+.B venti/write
+[
+.B -z
+]
+[
+.B -h
+.I host
+]
+[
+.B -t
+.I type
+]
+.br
+.B venti/copy
+[
+.B -fir
+]
+[
+.B -t
+.I type
+]
+.I srchost
+.I dsthost
+.I score
+.SH DESCRIPTION
+Venti is a SHA1-addressed block storage server.
+See 
+.IR venti (6)
+for a full introduction.
+.PP
+.I Read
+reads a block with the given
+.I score
+and numeric
+.I type 
+from the server
+.I host
+and prints the block to standard output.
+If the
+.B -h
+option is omitted,
+.I read
+consults the environment variable
+.B $venti
+for the name of the Venti server.
+If the
+.B -t
+option is omitted,
+.I read
+will try each type, one at a time, until it finds
+one that works.
+It prints the corresponding
+.B read
+.B -t
+command to standard error
+to indicate the type of the block.
+.PP
+.I Write
+writes at most 56 kilobytes of data from standard input 
+to the server
+.I host
+and prints the resulting score to standard output.
+If the
+.B -t
+option is omitted,
+.I write
+uses type 0,
+denoting a data block.
+If the
+.B -z
+option is given,
+.I write
+zero truncates the block before writing it to the server.
+.PP
+.I Copy
+expects
+.I score
+to be the score of a 
+.B VtRoot
+block.
+It copies the entire tree of blocks reachable from
+the root block from the server
+.I srchost
+to the server
+.IR dsthost .
+.PP
+The
+.B -f
+option causes
+.I copy
+to run in `fast' mode,
+assuming that if a block already exists on the
+destination Venti server, all its children also
+exist and need not be checked.
+.PP
+The
+.B -i
+and
+.B -r
+option control
+.IR copy 's
+reaction to errors reading
+from
+.IR srchost .
+.I Copy
+always prints information to standard error
+about each read error.
+By default,
+.I copy
+exits after printing the first error.
+If the
+.B -i
+option is given, read errors are ignored.
+This is dangerous behavior because it breaks the 
+assumption made by `fast' mode.
+If the
+.B -r
+option is given, 
+.I copy
+replaces pointers to unreadable blocks with
+pointers to the zero block.
+It writes the new root score to standard output.
+.SH SOURCE
+.B /sys/src/cmd/venti
+.SH SEE ALSO
+.IR vac (1),
+.IR venti (2),
+.IR vacfs (4),
+.IR venti (6),
+.IR venti (8),
+.IR venti-backup (8),
+.IR venti-fmt (8)
+.SH BUGS
+Currently
+.I venti/copy
+doesn't seem to copy the block corresponding to
+.IR score
+and possibly others, so use
+.I venti/copy
+for now.
+.PP
+There should be programs to read and write
+venti files and directories.

+ 246 - 0
sys/man/2/venti-cache

@@ -0,0 +1,246 @@
+.TH VENTI-CACHE 2
+.SH NAME
+VtBlock, VtCache, 
+vtblockcopy,
+vtblockdirty,
+vtblockduplock,
+vtblockput,
+vtblockwrite,
+vtcachealloc,
+vtcacheallocblock,
+vtcacheblocksize,
+vtcachefree,
+vtcacheglobal,
+vtcachelocal,
+vtcachesetwrite,
+vtglobaltolocal,
+vtlocaltoglobal \- Venti block cache
+.SH SYNOPSIS
+.ft L
+#include <u.h>
+.br
+#include <libc.h>
+.br
+#include <venti.h>
+.ta +\w'\fLxxxx 'u
+.PP
+.ft L
+.nf
+typedef struct VtBlock
+{
+	uchar *data;
+	uchar type;
+	uchar score[VtScoreSize];
+	u32int addr;
+	...
+} VtBlock;
+.ta +\w'\fLVtBlock* 'u +\w'\fLxxxxxxxx'u
+.PP
+.B
+VtCache*	vtcachealloc(VtConn *z, int blocksize, ulong nblocks);
+.PP
+.B
+void	vtcachefree(VtCache *c);
+.PP
+.B
+u32int	vtcacheblocksize(VtCache *c);
+.PP
+.B
+u32int	vtglobaltolocal(uchar score[VtScoreSize])
+.br
+.B
+void	vtlocaltoglobal(u32int local, uchar score[VtScoreSize])
+.PP
+.B
+VtBlock*	vtcacheallocblock(VtCache *c, int type);
+.PP
+.B
+VtBlock*	vtcachelocal(VtCache *c, u32int addr, int type);
+.PP
+.B
+VtBlock*	vtcacheglobal(VtCache *c, uchar[VtScoreSize], int type);
+.PP
+.B
+void	vtblockput(VtBlock *b);
+.PP
+.B
+void	vtblockduplock(VtBlock *b);
+.PP
+.B
+int	vtblockwrite(VtBlock *b);
+.PP
+.B
+void	vtcachesetwrite(VtCache *c,
+.br
+.B
+	   int (*write)(VtConn*, uchar[VtScoreSize], uint, uchar*, int));
+.PP
+.B
+VtBlock*	vtblockcopy(VtBlock *b);
+.PP
+.B
+int	vtblockdirty(VtBlock *b);
+.SH DESCRIPTION
+These functions provide access to a simple in-memory
+cache of blocks already stored on a Venti server
+and blocks that will eventually be stored on a Venti server.
+.PP
+A 
+.B VtBlock
+represents a venti data block.
+Blocks stored on a venti server,
+called
+.IR "global blocks" ,
+are named by the SHA1 hash of their contents.
+This hash is recorded as the block's
+.IR score .
+Such blocks are immutable.
+The cache also stores mutable blocks that have not yet been
+written to a venti server.  These blocks are called
+.IR "local blocks" ,
+and have special scores that are 16 zero bytes
+followed by a 4-byte big-endian
+.IR address .
+The address is an index into the internal set of cache blocks.
+.PP
+The user-visible contents of a
+.B VtBlock
+are
+.BR data ,
+a pointer to the data;
+.BR type ,
+the venti block type;
+.BR score ,
+the block's score;
+and
+.BR addr ,
+the block's cache address.
+.PP
+.I Vtcachealloc
+allocates a new cache using the client connection
+.I z
+(see
+.IR venti-conn (2)
+and
+.IR venti-client (2)),
+with room for
+.I nblocks
+of maximum block size
+.I blocksize .
+.PP
+.I Vtcachefree
+frees a cache and all the associated blocks.
+.PP
+.I Vtcacheblocksize
+returns the cache's maximum block size.
+.PP
+.I Vtglobaltolocal
+returns the local address corresponding to the given
+local
+.IR score .
+If passed a global score,
+.I vtglobaltolocal
+returns the special constant
+.B NilBlock
+.RB ( ~0 ).
+.I Vtlocaltoglobal
+is the opposite, setting
+.I score
+to the local score for the cache address
+.IR local .
+.PP
+.I Vtcacheallocblock
+allocates a new local block with the given
+.IR type .
+.PP
+.I Vtcachelocal
+retrieves the local block at address
+.I addr
+from the cache.
+The given
+.I type
+must match the type of the block found at
+.IR addr .
+.PP
+.I Vtcacheglobal
+retrieves the block with the given
+.I score
+and
+.I dtype
+from the cache, consulting the Venti server
+if necessary.
+If passed a local score,
+.I vtcacheglobal
+invokes
+.I vtcachelocal
+appropriately.
+.PP
+The block references returned by
+.IR vtcacheallocblock ,
+.IR vtcachelocal ,
+and
+.I vtcacheglobal
+must be released when no longer needed.
+.I Vtblockput
+releases such a reference.
+.PP
+It is occasionally convenient to have multiple variables
+refer to the same block.
+.I Vtblockduplock
+increments the block's reference count so that
+an extra 
+.I vtblockput
+will be required in order to release the block.
+.PP
+.I Vtblockwrite
+writes a local block to the Venti server,
+changing the block to a global block.
+It calls the cache's
+.I write
+function
+to write the block to the server.
+The default
+.I write
+function is 
+.I vtwrite
+(see
+.IR venti-client (2));
+.I vtsetcachewrite
+sets it.
+.I Vtsetcachewrite
+is used by clients to install replacement functions 
+that run writes in the background or perform other
+additional processing.
+.PP
+.I Vtblockcopy
+copies a block in preparation for modifying its contents.
+The old block may be a local or global block, 
+but the new block will be a local block.
+.PP
+The cache only evicts global blocks.
+Local blocks can only leave the cache via
+.IR vtblockwrite ,
+which turns them into global blocks, making them candidates for
+eviction.
+.PP
+If a new cache block must be allocated (for
+.IR vtcacheallocblock ,
+.IR vtcachelocal ,
+.IR vtcacheglobal ,
+or
+.IR vtblockcopy ),
+but the cache is filled (with local blocks and blocks that
+have not yet been released with
+.IR vtblockput ),
+the library prints the score and reference count of
+every block in the cache and then aborts.
+A full cache indicates either that the cache is too small,
+or, more commonly, that cache blocks are being leaked.
+.SH SOURCE
+.B /sys/src/libventi
+.SH SEE ALSO
+.IR venti (2),
+.IR venti-client (2),
+.IR venti-conn (2),
+.IR venti-file (2),
+.IR venti (6)

+ 190 - 0
sys/man/2/venti-client

@@ -0,0 +1,190 @@
+.TH VENTI-CLIENT 2
+.SH NAME
+vtconnect, vthello, vtread, vtwrite, vtreadpacket, vtwritepacket, vtsync, vtping, vtrpc, ventidoublechecksha1 \- Venti client
+.SH SYNOPSIS
+.ft L
+#include <u.h>
+.br
+#include <libc.h>
+.br
+#include <venti.h>
+.ta +\w'\fLPacket* 'u +\w'\fLxxxxxxxx'u
+.PP
+.B
+Packet*	vtrpc(VtConn *z, Packet *p)
+.PP
+.B
+int	vthello(VtConn *z)
+.PP
+.B
+int	vtconnect(VtConn *z)
+.PP
+.B
+int	vtread(VtConn *z, uchar score[VtScoreSize],
+.br
+.B
+		uint type, uchar *buf, int n)
+.PP
+.B
+int	vtwrite(VtConn *z, uchar score[VtScoreSize],
+.br
+.B
+		uint type, uchar *buf, int n)
+.PP
+.B
+Packet*	vtreadpacket(VtConn *z, uchar score[VtScoreSize],
+.br
+.B
+		uint type, int n)
+.PP
+.B
+int	vtwritepacket(VtConn *z, uchar score[VtScoreSize],
+.br
+.B
+		uint type, Packet *p)
+.PP
+.B
+int	vtsync(VtConn *z)
+.PP
+.B
+int	vtping(VtConn *z)
+.PP
+.B
+extern int ventidoublechecksha1;  /* default 1 */
+.SH DESCRIPTION
+These routines execute the client side of the 
+.IR venti (6)
+protocol.
+.PP
+.I Vtrpc
+executes a single Venti RPC transaction, sending the request 
+packet
+.IR p
+and then waiting for and returning the response packet.
+.I Vtrpc
+will set the tag in the packet.
+.I Vtrpc
+frees
+.IR p ,
+even on error.
+.I Vtrpc
+is typically called only indirectly, via the functions below.
+.PP
+.I Vthello
+executes a
+.B hello
+transaction, setting
+.IB z ->sid
+to the name used by the server.
+.I Vthello
+is typically called only indirectly, via
+.IR vtconnect .
+.PP
+.I Vtconnect
+calls
+.I vtversion
+(see
+.IR venti-conn (2))
+and
+.IR vthello ,
+in that order, returning success only
+if both succeed.
+This sequence (calling 
+.I vtversion
+and then
+.IR vthello )
+must be done before the functions below can be called.
+.PP
+.I Vtread
+reads the block with the given
+.I score
+and
+.I type
+from the server,
+stores the returned data
+in memory at
+.IR buf ,
+and returns the number of bytes read.
+If the server's block has size larger than
+.IR n ,
+.I vtread 
+does not modify
+.I buf
+and
+returns an error.
+.PP
+.I Vtwrite
+writes the
+.I n
+bytes in 
+.I buf
+as a block of the given
+.IR type ,
+setting 
+.IR score .
+.PP
+.I Vtreadpacket
+and
+.I vtwritepacket
+are like
+.I vtread
+and
+.I vtwrite
+but return or accept the block contents in the
+form of a