git://git.openafs.org
/
openafs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
8c887b2
)
segments-keep-chunkbytes-and-validpos-in-sync-20040914
author
Christof Hanke
<hanke@rzg.mpg.de>
Wed, 15 Sep 2004 04:54:28 +0000 (
04:54
+0000)
committer
Derrick Brashear
<shadow@dementia.org>
Wed, 15 Sep 2004 04:54:28 +0000 (
04:54
+0000)
FIXES 15200
"Basically, the pointers (struct dcache *)->validPos and (struct dcache *)->f.chunkBytes are not kept in sync."
src/afs/afs_segments.c
patch
|
blob
|
history
diff --git
a/src/afs/afs_segments.c
b/src/afs/afs_segments.c
index
f9d5b80
..
1ebbceb
100644
(file)
--- a/
src/afs/afs_segments.c
+++ b/
src/afs/afs_segments.c
@@
-1041,6
+1041,12
@@
afs_TruncateAllSegments(register struct vcache *avc, afs_size_t alen,
afs_CFileTruncate(tfile, newSize);
afs_CFileClose(tfile);
afs_AdjustSize(tdc, newSize);
+ if (alen < tdc->validPos) {
+ if (alen < AFS_CHUNKTOBASE(tdc->f.chunk))
+ tdc->validPos = 0;
+ else
+ tdc->validPos = alen;
+ }
ConvertWToSLock(&tdc->lock);
}
ReleaseSharedLock(&tdc->lock);