Home
last modified time | relevance | path

Searched refs:score (Results 1 – 25 of 102) sorted by relevance

12345

/plan9/sys/src/cmd/venti/
H A Dcopy.c23 uchar score[VtScoreSize]; member
39 i = memcmp(a->score, b->score, VtScoreSize); in scoretreecmp()
46 havevisited(uchar score[VtScoreSize], int type) in havevisited()
52 memmove(a.score, score, VtScoreSize); in havevisited()
58 markvisited(uchar score[VtScoreSize], int type) in markvisited()
66 memmove(a->score, score, VtScoreSize); in markvisited()
79 walk(uchar score[VtScoreSize], uint type, int base) in walk()
87 if(memcmp(score, vtzeroscore, VtScoreSize) == 0 || memcmp(score, zeroscore, VtScoreSize) == 0) in walk()
90 if(havevisited(score, type)){ in walk()
96 if(fast && vtread(zdst, score, type, buf, VtMaxLumpSize) >= 0){ in walk()
[all …]
H A Droot.c18 uchar score[VtScoreSize]; in threadmain() local
51 if(vtparsescore(argv[i], nil, score) < 0){ in threadmain()
55 n = vtread(z, score, VtRootType, buf, VtMaxLumpSize); in threadmain()
57 fprint(2, "could not read block %V: %r\n", score); in threadmain()
61 fprint(2, "block %V is wrong size %d != 300\n", score, n); in threadmain()
65 fprint(2, "unpacking block %V: %r\n", score); in threadmain()
68 print("%V: %q %q %V %d %V\n", score, root.name, root.type, root.score, root.blocksize, root.prev); in threadmain()
H A Dread.c18 uchar score[VtScoreSize]; in threadmain() local
43 if(vtparsescore(argv[0], nil, score) < 0) in threadmain()
58 n = vtread(z, score, type, buf, VtMaxLumpSize); in threadmain()
61 score, type); in threadmain()
66 n = vtread(z, score, type, buf, VtMaxLumpSize); in threadmain()
H A Dreadlist.c22 parsescore(uchar *score, char *buf, int n) in parsescore() argument
26 memset(score, 0, VtScoreSize); in parsescore()
48 score[i>>1] |= c; in parsescore()
94 uchar score[20]; in run() local
102 if(parsescore(score, f[0], strlen(f[0])) < 0) in run()
105 n = vtread(z, score, type, buf, VtMaxLumpSize); in run()
H A Drandtest.c35 uchar score[VtScoreSize], score2[VtScoreSize]; in wr() local
41 sha1((uchar*)buf, blocksize, score, &ds); in wr()
43 sysfatal("vtwrite %V at %,lld: %r", score, cur); in wr()
44 if(doublecheck && memcmp(score, score2, VtScoreSize) != 0) in wr()
45 sysfatal("score mismatch! %V %V", score, score2); in wr()
63 uchar score[VtScoreSize]; in rd() local
67 sha1((uchar*)buf, blocksize, score, &ds); in rd()
68 if(vtread(z, score, VtDataType, (uchar*)buf2, blocksize) < 0) in rd()
69 sysfatal("vtread %V at %,lld: %r", score, cur); in rd()
71 sysfatal("bad data read! %V", score); in rd()
H A Dmkroot.c18 uchar score[VtScoreSize]; in threadmain() local
40 if(vtparsescore(argv[2], nil, root.score) < 0) in threadmain()
54 if(vtwrite(z, score, VtRootType, buf, VtRootSize) < 0) in threadmain()
59 print("%V\n", score); in threadmain()
/plan9/sys/src/cmd/venti/srv/
H A Dlump.c10 static Packet *readilump(Lump *u, IAddr *ia, u8int *score);
16 readlump(u8int *score, int type, u32int size, int *cached) in readlump() argument
29 if(scorecmp(score, zeroscore) == 0) in readlump()
31 u = lookuplump(score, type); in readlump()
51 if(lookupscore(score, type, &ia) < 0){ in readlump()
53 seterr(EOk, "no block with score %V/%d exists", score, type); in readlump()
66 p = readilump(u, &ia, score); in readlump()
78 writelump(Packet *p, u8int *score, int type, u32int creator, uint ms) in writelump() argument
89 packetsha1(p, score); in writelump()
95 u = lookuplump(score, type); in writelump()
[all …]
H A Dfindscore.c18 && scorecmp(c->score, d->score)==0; in clumpinfoeq()
22 findscore(Arena *arena, uchar *score) in findscore() argument
50 if(scorecmp(score, ci->score)==0){ in findscore()
75 u8int score[VtScoreSize]; in threadmain() local
95 if(strscore(argv[1], score) < 0) in threadmain()
115 found += findscore(ap->arenas[i], score); in threadmain()
117 print("found %d occurrences of %V\n", found, score); in threadmain()
H A Dhdisk.c203 char *score; in diskarenapart() local
281 scorecp(arena.score, blk+head.blocksize - VtScoreSize); in diskarenapart()
290 hprint(&c->hout, "score %V\n", arena.score); in diskarenapart()
306 score = hargstr(c, "score", ""); in diskarenapart()
311 diskarenaclump(c, &arena, off, score[0] ? score : nil); in diskarenapart()
312 }else if(score[0]){ in diskarenapart()
313 diskarenaclump(c, &arena, -1, score); in diskarenapart()
324 findintoc(HConnect *c, Arena *arena, uchar *score) in findintoc() argument
346 if(scorecmp(ci.score, score) == 0){ in findintoc()
393 ci.type, ci.size, ci.uncsize, ci.score); in diskarenatoc()
[all …]
H A Dbloom.c137 gethashes(u8int *score, ulong *h) in gethashes() argument
145 a ^= *(u32int*)(score+i); in gethashes()
146 b ^= *(u32int*)(score+i+4); in gethashes()
149 a ^= *(u32int*)(score+i); in gethashes()
155 _markbloomfilter(Bloom *b, u8int *score) in _markbloomfilter() argument
161 trace("markbloomfilter", "markbloomfilter %V", score); in _markbloomfilter()
162 gethashes(score, h); in _markbloomfilter()
181 _inbloomfilter(Bloom *b, u8int *score) in _inbloomfilter() argument
187 gethashes(score, h); in _inbloomfilter()
198 inbloomfilter(Bloom *b, u8int *score) in inbloomfilter() argument
[all …]
H A Dicache.c67 ihashlookup(IHash *ih, u8int score[VtScoreSize], int type) in ihashlookup()
72 h = hashbits(score, ih->bits); in ihashlookup()
74 if((type == -1 || type == ie->ia.type) && scorecmp(score, ie->score) == 0) in ihashlookup()
85 h = hashbits(ie->score, ih->bits); in ihashdelete()
91 fprint(2, "warning: %s %V not found in ihashdelete\n", what, ie->score); in ihashdelete()
99 h = hashbits(ie->score, ih->bits); in ihashinsert()
338 icacheinsert(u8int score[VtScoreSize], IAddr *ia, int state) in icacheinsert()
356 memmove(ie->score, score, VtScoreSize); in icacheinsert()
374 icachelookup(u8int score[VtScoreSize], int type, IAddr *ia) in icachelookup()
380 if((ie = ihashlookup(icache.hash, score, type)) != nil){ in icachelookup()
[all …]
H A Dsyncarena.c14 || scorecmp(c->score, d->score)!=0; in clumpinfocmp()
34 u8int score[VtScoreSize]; in syncarena() local
63 lump = loadclump(arena, aa, 0, &cl, score, 0); in syncarena()
68 scoremem(score, lump->data, cl.info.uncsize); in syncarena()
69 if(scorecmp(cl.info.score, score) != 0){ in syncarena()
105 cl.info.score, cl.info.type, cl.info.size, cl.info.uncsize); in syncarena()
107 ci.score, ci.type, ci.size, ci.uncsize); in syncarena()
119 trace(TraceProc, "syncarena unindexed clump %V %d", cl.info.score, arena->memstats.clumps); in syncarena()
H A Dscore.c11 scoremem(u8int *score, u8int *buf, int n) in scoremem() argument
16 sha1(buf, n, score, &s); in scoremem()
32 strscore(char *s, u8int *score) in strscore() argument
43 score[i] = (c << 4) + d; in strscore()
H A Dprintarena.c18 uchar score[VtScoreSize]; in rdarena() local
42 lump = loadclump(arena, aa, 0, &cl, score, 0); in rdarena()
48 scoremem(score, lump->data, cl.info.uncsize); in rdarena()
49 if(scorecmp(cl.info.score, score) != 0) { in rdarena()
58 print("%22llud %V %3d %5d\n", aa, score, cl.info.type, cl.info.uncsize); in rdarena()
H A Dmirrorarenas.c261 if(sa->diskstats.sealed && da->diskstats.sealed && scorecmp(da->score, zeroscore) != 0){ in mirror()
262 if(scorecmp(sa->score, da->score) == 0){ in mirror()
264 chat("%T %s: %V sealed mirrored\n", sa->name, sa->score); in mirror()
267 chat("%T %s: warning: sealed score mismatch %V vs %V\n", sa->name, sa->score, da->score); in mirror()
270 if(!sa->diskstats.sealed && da->diskstats.sealed && scorecmp(da->score, zeroscore) != 0){ in mirror()
306 sealed = sa->diskstats.sealed && scorecmp(sa->score, zeroscore) != 0; in mirror()
379 sha1(buf, VtScoreSize, da->score, ds); in mirror()
380 if(scorecmp(sa->score, da->score) == 0){ in mirror()
382 chat("%T %s: %V sealed mirrored\n", sa->name, sa->score); in mirror()
383 if(ewritepart(dst, end+blocksize-VtScoreSize, da->score, VtScoreSize) < 0) in mirror()
[all …]
/plan9/sys/src/libventi/
H A Dclient.c61 vtreadpacket(VtConn *z, uchar score[VtScoreSize], uint type, int n) in vtreadpacket()
65 if(memcmp(score, vtzeroscore, VtScoreSize) == 0) in vtreadpacket()
72 memmove(tx.score, score, VtScoreSize); in vtreadpacket()
81 packetsha1(rx.data, tx.score); in vtreadpacket()
82 if(memcmp(score, tx.score, VtScoreSize) != 0){ in vtreadpacket()
83 werrstr("read asked for %V got %V", score, tx.score); in vtreadpacket()
92 vtread(VtConn *z, uchar score[VtScoreSize], uint type, uchar *buf, int n) in vtread()
97 if((p = vtreadpacket(z, score, type, n)) == nil) in vtread()
107 vtwritepacket(VtConn *z, uchar score[VtScoreSize], uint type, Packet *p) in vtwritepacket()
112 memmove(score, vtzeroscore, VtScoreSize); in vtwritepacket()
[all …]
H A Dcache.c124 i, b->type, b->score, b->iostate, b->addr, b->ref, b->nlock); in vtcachedump()
294 if(0)fprint(2, "droping %x:%V\n", b->addr, b->score); in vtcachebumpblock()
345 vtlocaltoglobal(b->addr, b->score); in vtcacheallocblock()
359 vtcacheglobal(VtCache *c, uchar score[VtScoreSize], int type) in vtcacheglobal()
367 fprint(2, "vtcacheglobal %V %d from %p\n", score, type, getcallerpc(&c)); in vtcacheglobal()
368 addr = vtglobaltolocal(score); in vtcacheglobal()
371 fprint(2, "vtcacheglobal %V %d => local\n", score, type); in vtcacheglobal()
378 h = (u32int)(score[0]|(score[1]<<8)|(score[2]<<16)|(score[3]<<24)) % c->nhash; in vtcacheglobal()
385 if(b->addr != NilBlock || memcmp(b->score, score, VtScoreSize) != 0 || b->type != type) in vtcacheglobal()
391 fprint(2, "vtcacheglobal %V %d => found in cache %p; locking\n", score, type, b); in vtcacheglobal()
[all …]
H A Dfile.c102 memmove(r->score, b->score, VtScoreSize); in vtfilealloc()
149 memmove(e.score, vtzeroscore, VtScoreSize); in vtfilecreateroot()
243 memmove(e.score, vtzeroscore, VtScoreSize); in _vtfilecreate()
286 memmove(e.score, vtzeroscore, VtScoreSize); in vtfilekill()
330 uchar score[VtScoreSize]; in shrinksize() local
333 b = vtcacheglobal(r->c, e->score, e->type); in shrinksize()
370 memmove(score, b->data+i*VtScoreSize, VtScoreSize); in shrinksize()
372 b = vtcacheglobal(r->c, score, type); in shrinksize()
505 uchar *score; in blockwalk() local
513 score = e->score; in blockwalk()
[all …]
/plan9/sys/src/cmd/fossil/
H A Dbwatch.c60 hash(uchar score[VtScoreSize]) in hash()
66 h = h*37 + score[i]; in hash()
101 _bwatchResetParent(uchar *score) in _bwatchResetParent() argument
106 h = hash(score); in _bwatchResetParent()
109 if(memcmp(w->p, score, VtScoreSize) == 0){ in _bwatchResetParent()
130 _bwatchResetChild(uchar *score) in _bwatchResetChild() argument
135 h = hash(score); in _bwatchResetChild()
138 if(memcmp(w->c, score, VtScoreSize) == 0){ in _bwatchResetChild()
196 bwatchReset(uchar score[VtScoreSize]) in bwatchReset()
199 _bwatchResetParent(score); in bwatchReset()
[all …]
H A Darchive.c70 uchar score[VtScoreSize]; in ventiSend() local
77 if(!vtWrite(a->z, score, vtType[b->l.type], data, n)){ in ventiSend()
81 if(!vtSha1Check(score, data, n)){ in ventiSend()
85 b->addr, score, score2); in ventiSend()
126 uchar score[VtScoreSize]; member
130 shaBlock(uchar score[VtScoreSize], Block *b, uchar *data, uint bsize) in shaBlock()
132 vtSha1(score, data, vtZeroTruncate(vtType[b->l.type], data, bsize)); in shaBlock()
181 uchar *data, score[VtScoreSize]; in archWalk() local
194 memmove(p->score, vtZeroScore, VtScoreSize); in archWalk()
209 for(i=0; nextWalk(&w, score, &type, &tag, &e); i++){ in archWalk()
[all …]
H A Dflfmt.c57 char *score = nil; in main() local
81 score = EARGF(usage()); in main()
98 if(iso9660file && score) in main()
146 if(score) in main()
147 root = ventiRoot(host, score); in main()
156 if(score == nil) in main()
239 memmove(e->score, vtZeroScore, VtScoreSize); in entryInit()
291 localToGlobal(addr, e->score); in rootMetaInit()
321 localToGlobal(addr, e->score); in rootInit()
358 superInit(char *label, u32int root, uchar score[VtScoreSize]) in superInit()
[all …]
H A Dsource.c44 fs->name, pname, b->score); in sourceAlloc()
50 fs->name, pname, e.score); in sourceAlloc()
56 fs->name, pname, e.score, e.psize, e.dsize); in sourceAlloc()
64 e.score, e.depth, e.size, e.psize, e.dsize); in sourceAlloc()
71 fs->name, pname, e.score, e.flags, e.tag); in sourceAlloc()
78 "> blocksize %ud\n", fs->name, pname, e.score, in sourceAlloc()
118 memmove(r->score, b->score, VtScoreSize); in sourceAlloc()
238 memmove(e.score, vtZeroScore, VtScoreSize); in sourceCreate()
281 addr = globalToLocal(e.score); in sourceKill()
297 memmove(e.score, vtZeroScore, VtScoreSize); in sourceKill()
[all …]
H A Dpack.c98 globalToLocal(uchar score[VtScoreSize]) in globalToLocal()
103 if(score[i] != 0) in globalToLocal()
106 return U32GET(score+VtScoreSize-4); in globalToLocal()
110 localToGlobal(u32int addr, uchar score[VtScoreSize]) in localToGlobal()
112 memset(score, 0, VtScoreSize-4); in localToGlobal()
113 U32PUT(score+VtScoreSize-4, addr); in localToGlobal()
133 if(globalToLocal(e->score) == NilBlock) in entryPack()
139 memmove(p+36, e->score+16, 4); in entryPack()
141 memmove(p+20, e->score, VtScoreSize); in entryPack()
161 memset(e->score, 0, 16); in entryUnpack()
[all …]
/plan9/rc/bin/
H A D9fs36 score=$1
38 score=$home/lib/vac/$1
40 score=/lib/vac/$1
42 echo $0: $1: no such score file >[1=2]
45 vacfs -m /n/`{basename $1 .vac} `{cat $score}
/plan9/sys/include/
H A Doventi.h94 uchar score[VtScoreSize]; /* to a Dir block */ member
106 uchar score[VtScoreSize]; member
110 Packet *(*read)(VtSession*, uchar score[VtScoreSize], int type, int n);
111 int (*write)(VtSession*, uchar score[VtScoreSize], int type, Packet *p);
167 int vtRead(VtSession*, uchar score[VtScoreSize], int type, uchar *buf, int n);
168 int vtWrite(VtSession*, uchar score[VtScoreSize], int type, uchar *buf, int n);
169 Packet *vtReadPacket(VtSession*, uchar score[VtScoreSize], int type, int n);
170 int vtWritePacket(VtSession*, uchar score[VtScoreSize], int type, Packet *p);
193 void vtSha1(uchar score[VtScoreSize], uchar *, int);
194 int vtSha1Check(uchar score[VtScoreSize], uchar *, int);

12345