update
This commit is contained in:
parent
e9254adc8f
commit
c1e6f6426f
3 changed files with 11 additions and 10 deletions
|
|
@ -640,7 +640,7 @@ filemapblock(VacFile *f, ulong bn, uchar score[VtScoreSize], ulong tag)
|
||||||
vtentrypack(&e, b->data, f->source->offset % f->source->epb);
|
vtentrypack(&e, b->data, f->source->offset % f->source->epb);
|
||||||
}else
|
}else
|
||||||
memmove(b->data + (bn%(e.psize/VtScoreSize))*VtScoreSize, score, VtScoreSize);
|
memmove(b->data + (bn%(e.psize/VtScoreSize))*VtScoreSize, score, VtScoreSize);
|
||||||
vtblockdirty(b);
|
/* vtblockdirty(b); */
|
||||||
vtblockput(b);
|
vtblockput(b);
|
||||||
vtfileunlock(s);
|
vtfileunlock(s);
|
||||||
fileunlock(f);
|
fileunlock(f);
|
||||||
|
|
@ -738,7 +738,7 @@ if(0)fprint(2, "fileWrite: %s %d, %lld\n", f->dir.elem, cnt, offset);
|
||||||
p += n;
|
p += n;
|
||||||
offset += n;
|
offset += n;
|
||||||
bn++;
|
bn++;
|
||||||
vtblockdirty(b);
|
/* vtblockdirty(b); */
|
||||||
vtblockput(b);
|
vtblockput(b);
|
||||||
}
|
}
|
||||||
if(offset > eof && vtfilesetsize(s, offset) < 0)
|
if(offset > eof && vtfilesetsize(s, offset) < 0)
|
||||||
|
|
@ -1084,7 +1084,7 @@ if(0)fprint(2, "old size %d new size %d\n", me.size, n);
|
||||||
vdpack(&f->dir, &me);
|
vdpack(&f->dir, &me);
|
||||||
mbinsert(&mb, i, &me);
|
mbinsert(&mb, i, &me);
|
||||||
mbpack(&mb);
|
mbpack(&mb);
|
||||||
vtblockdirty(b);
|
/* vtblockdirty(b); */
|
||||||
vtblockput(b);
|
vtblockput(b);
|
||||||
vtfileunlock(fp->msource);
|
vtfileunlock(fp->msource);
|
||||||
f->dirty = 0;
|
f->dirty = 0;
|
||||||
|
|
@ -1104,7 +1104,7 @@ if(0)fprint(2, "old size %d new size %d\n", me.size, n);
|
||||||
if(boff == NilBlock){
|
if(boff == NilBlock){
|
||||||
/* mbResize might have modified block */
|
/* mbResize might have modified block */
|
||||||
mbpack(&mb);
|
mbpack(&mb);
|
||||||
vtblockdirty(b);
|
/* vtblockdirty(b); */
|
||||||
goto Err;
|
goto Err;
|
||||||
}
|
}
|
||||||
fprint(2, "fileMetaFlush moving entry from %ud -> %ud\n", f->boff, boff);
|
fprint(2, "fileMetaFlush moving entry from %ud -> %ud\n", f->boff, boff);
|
||||||
|
|
@ -1116,7 +1116,7 @@ fprint(2, "fileMetaFlush moving entry from %ud -> %ud\n", f->boff, boff);
|
||||||
mbpack(&mb);
|
mbpack(&mb);
|
||||||
// blockDependency(b, bb, -1, nil, nil);
|
// blockDependency(b, bb, -1, nil, nil);
|
||||||
vtblockput(bb);
|
vtblockput(bb);
|
||||||
vtblockdirty(b);
|
/* vtblockdirty(b); */
|
||||||
vtblockput(b);
|
vtblockput(b);
|
||||||
vtfileunlock(fp->msource);
|
vtfileunlock(fp->msource);
|
||||||
|
|
||||||
|
|
@ -1159,7 +1159,7 @@ filemetaremove(VacFile *f, char *uid)
|
||||||
mbpack(&mb);
|
mbpack(&mb);
|
||||||
vtfileunlock(up->msource);
|
vtfileunlock(up->msource);
|
||||||
|
|
||||||
vtblockdirty(b);
|
/* vtblockdirty(b); */
|
||||||
vtblockput(b);
|
vtblockput(b);
|
||||||
|
|
||||||
f->removed = 1;
|
f->removed = 1;
|
||||||
|
|
@ -1562,7 +1562,7 @@ filemetaalloc(VacFile *f, VacDir *dir, u32int start)
|
||||||
if(p == nil){
|
if(p == nil){
|
||||||
/* mbAlloc might have changed block */
|
/* mbAlloc might have changed block */
|
||||||
mbpack(&mb);
|
mbpack(&mb);
|
||||||
vtblockdirty(b);
|
/* vtblockdirty(b); */
|
||||||
werrstr(EBadMeta);
|
werrstr(EBadMeta);
|
||||||
goto Err;
|
goto Err;
|
||||||
}
|
}
|
||||||
|
|
@ -1593,7 +1593,7 @@ filemetaalloc(VacFile *f, VacDir *dir, u32int start)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
vtblockdirty(b);
|
/* vtblockdirty(b); */
|
||||||
vtblockput(b);
|
vtblockput(b);
|
||||||
return bo;
|
return bo;
|
||||||
Err:
|
Err:
|
||||||
|
|
@ -1792,7 +1792,7 @@ setEntry(Source *r, Entry *e)
|
||||||
/* BUG b should depend on the entry pointer */
|
/* BUG b should depend on the entry pointer */
|
||||||
|
|
||||||
markCopied(b);
|
markCopied(b);
|
||||||
vtblockdirty(b);
|
/* vtblockdirty(b); */
|
||||||
vtblockput(b);
|
vtblockput(b);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ vacfsalloc(VtConn *z, int bsize, int ncache, int mode)
|
||||||
fs->ref = 1;
|
fs->ref = 1;
|
||||||
fs->z = z;
|
fs->z = z;
|
||||||
fs->bsize = bsize;
|
fs->bsize = bsize;
|
||||||
fs->cache = vtcachealloc(z, bsize, ncache, mode);
|
fs->cache = vtcachealloc(z, bsize, ncache);
|
||||||
return fs;
|
return fs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -86,6 +86,7 @@ vtfilealloc(VtCache *c, VtBlock *b, VtFile *p, u32int offset, int mode)
|
||||||
r->c = c;
|
r->c = c;
|
||||||
r->mode = mode;
|
r->mode = mode;
|
||||||
r->dsize = e.dsize;
|
r->dsize = e.dsize;
|
||||||
|
r->psize = e.psize;
|
||||||
r->gen = e.gen;
|
r->gen = e.gen;
|
||||||
r->dir = (e.type & VtTypeBaseMask) == VtDirType;
|
r->dir = (e.type & VtTypeBaseMask) == VtDirType;
|
||||||
r->ref = 1;
|
r->ref = 1;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue