diff options
author | rsc <devnull@localhost> | 2004-06-17 19:17:04 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2004-06-17 19:17:04 +0000 |
commit | a1882dc1d0eeb8eb15614b28d3c11a3697bcd185 (patch) | |
tree | 81f63288a9817c74375dbdff9bf0f00cc0d20bd1 /src/libventi/file.c | |
parent | 7cb748941ecffdd66630ba463080cf44fcb62161 (diff) | |
download | plan9port-a1882dc1d0eeb8eb15614b28d3c11a3697bcd185.tar.gz plan9port-a1882dc1d0eeb8eb15614b28d3c11a3697bcd185.tar.bz2 plan9port-a1882dc1d0eeb8eb15614b28d3c11a3697bcd185.zip |
silly cache hack, also fix vtfilewritebefore not to be so aggressive.
Diffstat (limited to 'src/libventi/file.c')
-rw-r--r-- | src/libventi/file.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/libventi/file.c b/src/libventi/file.c index dac53a51..b2f5b155 100644 --- a/src/libventi/file.c +++ b/src/libventi/file.c @@ -1222,10 +1222,13 @@ vtfileflushbefore(VtFile *r, u64int offset) * if the rest of the block is already flushed, * we can flush the whole block. */ - ok = 1; - for(; j<ppb; j++) - if(vtglobaltolocal(b->data+j*VtScoreSize) != NilBlock) - ok = 0; + ok = 0; + if(index[i] != index1[i]){ + ok = 1; + for(; j<ppb; j++) + if(vtglobaltolocal(b->data+j*VtScoreSize) != NilBlock) + ok = 0; + } } if(ok){ if(i == depth) |