Many file systems report differing percentages of unallocated space over
a range of sizes, as well differing figures using their own specific
tools or using statvfs() system call when mounted.
File systems reporting intrinsic unallocated space using their specific
tools are: jfs, lvm2 pv and ntfs. LVM2 PV has the largest amount of
unallocated space with its default Physical Extent size of 4 MiB. For a
100 MiB partition it has 4.0% unallocated space.
File systems reporting intrinsic unallocated space using the statvfs()
system call when mounted are: ext2/3/4, fat16/32, hfs, jfs, nilfs2,
ntfs, reiserfs, and xfs. Xfs has the worst identified unallocated space
of ~4.7% in a 100 MiB partition. Ext2/3 exhibit unusual behaviour by
reporting unallocated space of ~4.6% in a 100 MiB partition falling to a
constant percentage of ~1.8% for sizes of 1 GiB and above.
Update the calculation for used to estimate the maximum size of
intrinsic unallocated space. Limit is now 5% for partitions smaller
than 100 MiB, 2% for partitions larger than 1 GiB and linear scaling of
the percentage between. Will still get false unallocated space warnings
for mounted xfs file systems and lvm2 pvs smaller than 100 MiB.
Also add a short note and worked example calculation of unallocated
space to the HACKING file.
Bug #499202 - gparted does not see the difference if partition size
differs from filesystem size