disconnected-allow-larger-directories-20090123
authorSimon Wilkinson <sxw@inf.ed.ac.uk>
Fri, 23 Jan 2009 14:44:31 +0000 (14:44 +0000)
committerDerrick Brashear <shadow@dementia.org>
Fri, 23 Jan 2009 14:44:31 +0000 (14:44 +0000)
LICENSE IPL10
FIXES 124182

allow directories larger than a chunk

src/afs/afs_dcache.c

index eef6fa6..e5c760b 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));