From 0f73c7ebca2f7e2fbb5d04d4a869e9482514a83e Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Fri, 23 Jan 2009 14:44:41 +0000 Subject: [PATCH] DEVEL15-disconnected-allow-larger-directories-20090123 LICENSE IPL10 FIXES 124182 allow directories larger than a chunk (cherry picked from commit c93e751599db8b8b1515a400ce398a4d365be782) --- src/afs/afs_dcache.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/afs/afs_dcache.c b/src/afs/afs_dcache.c index 964047f57..252798201 100644 --- a/src/afs/afs_dcache.c +++ b/src/afs/afs_dcache.c @@ -1393,6 +1393,12 @@ afs_DCacheMissingChunks(struct vcache *avc) totalLength--; totalChunks = (AFS_CHUNK(totalLength) + 1); + /* If we're a directory, we only ever have one chunk, regardless of + * the size of the dir. + */ + if (avc->fid.Fid.Vnode & 1 || vType(avc) == VDIR) + totalChunks = 1; + /* printf("Should have %d chunks for %u bytes\n", totalChunks, (totalLength + 1)); -- 2.39.5