tupdate - plan9port - [fork] Plan 9 from user space
git clone git://src.adamsgaard.dk/plan9port
Log
Files
Refs
README
LICENSE
---
commit c1e6f6426f830d662054960543054b0ae40a8504
parent e9254adc8f015c3ed422ce488801ed123c4a0749
Author: rsc 
Date:   Wed, 13 Jul 2005 13:59:50 +0000

update

Diffstat:
  M src/cmd/vac/file.c                  |      18 +++++++++---------
  M src/cmd/vac/fs.c                    |       2 +-
  M src/libventi/file.c                 |       1 +

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