Windows: report AllocationSize in 1KB increments
authorJeffrey Altman <jaltman@your-file-system.com>
Wed, 24 Sep 2014 22:12:31 +0000 (18:12 -0400)
committerJeffrey Altman <jaltman@your-file-system.com>
Thu, 25 Sep 2014 12:30:45 +0000 (08:30 -0400)
Windows expects storage to be allocated in increments of some
block size.  The AFS servers allocate in 1K units so lets report
that to Windows.

Change-Id: I64ad1844339357733933cd9e360551fdcd450146
Reviewed-on: http://gerrit.openafs.org/11490
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

src/WINNT/afsrdr/user/RDRFunction.c

index a80db3b..f1c6b59 100644 (file)
@@ -532,7 +532,8 @@ RDR_PopulateCurrentEntry( IN  AFSDirEnumEntry * pCurrentEntry,
     pCurrentEntry->ChangeTime = pCurrentEntry->CreationTime;
 
     pCurrentEntry->EndOfFile = scp->length;
-    pCurrentEntry->AllocationSize = scp->length;
+    pCurrentEntry->AllocationSize.QuadPart =
+       ((scp->length.QuadPart/1024)+1)*1024;
 
     if (bMustFake) {
         switch (scp->fileType) {