xfs/294: calculate space to reserve for fragmentation test
This test requires us to fragment free space, and in part accomplishes
this by fallocating 400M of a 512M filesystem, then fallocating another
70M, and then using dd to eat remaining space. However, it's risky to
assume the 400M figure because new features such as reflink and rmap
have per-ag metadata reservations which add to overhead. Therefore,
reserve the 70M fragment file first, then try to fallocate 95% of the
remaining free space.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Tested-by: Yang Xu<xuyang2018.jy@cn.fujitsu.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>