]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
DEVEL15-disconnected-allow-larger-directories-20090123
authorSimon Wilkinson <sxw@inf.ed.ac.uk>
Fri, 23 Jan 2009 14:44:41 +0000 (14:44 +0000)
committerDerrick Brashear <shadow@dementia.org>
Fri, 23 Jan 2009 14:44:41 +0000 (14:44 +0000)
LICENSE IPL10
FIXES 124182

allow directories larger than a chunk

(cherry picked from commit c93e751599db8b8b1515a400ce398a4d365be782)

src/afs/afs_dcache.c

index 964047f574be128ae713b281e744c7ac398b3ab1..2527982019b9615197dcb1770a89d5821793acf0 100644 (file)
@@ -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));