Win 8.1 show roundup size in 'Size on disk' column

Jones jones.kstw at
Sat Feb 8 04:51:45 MST 2014

Hello list,

The client is windows 8.1,
and the server is samba-4.1.4,
there is a 30-byte txt file resident in server,

Through file explorer and right click this file -> Properties,
under General tag there are 2 column to show file size,
it is like the 'Size on disk' is rounding up.
(1) Size: 30 bytes (30 bytes)
(2) Size on disk: 1.00 MB (1,408,576 bytes)

And 'Size on disk' depends on 'allocation roundup size',
if 'allocation roundup size' = 1408576 (default),
the 'Size on disk' is 1.00 MB;
if 'allocation roundup size' = 268435456,
the 'Size on disk' is 256.00 MB;

With wireshark,
found the 'Size' is the same as 'End Of File',
and 'Size on disk' is the same as 'Allocation Size'.

Windows 7, Windows Server 2008R2 does not show oversize value in 'Size on

After manually editing this and re-build,
it is okay to show probably size in 'Size on disk' with windows 8.1,
        if (fsp && fsp->initial_allocation_size)
                result = MAX(result,fsp->initial_allocation_size);

-       result = smb_roundup(handle->conn, result);
+      result = SMB_ROUNDUP(result, 4096);

        return result;

It is likely latest windows 8.1 got this unexpected value in 'Size on disk',
and 'allocation roundup size = 268435456' is my default setting to improve
but im not sure how to fix this issue for windows 8.1,
any suggestion is deeply appreciated,



More information about the samba-technical mailing list