From: Simon Wilkinson Date: Fri, 23 Jan 2009 14:44:31 +0000 (+0000) Subject: disconnected-allow-larger-directories-20090123 X-Git-Tag: openafs-devel-1_5_61~575 X-Git-Url: https://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=c93e751599db8b8b1515a400ce398a4d365be782 disconnected-allow-larger-directories-20090123 LICENSE IPL10 FIXES 124182 allow directories larger than a chunk --- diff --git a/src/afs/afs_dcache.c b/src/afs/afs_dcache.c index eef6fa6..e5c760b 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));