btrfs/177: fix for nodesize 64K and type single
authorAnand Jain <anand.jain@oracle.com>
Tue, 10 Mar 2020 04:22:32 +0000 (12:22 +0800)
committerEryu Guan <guaneryu@gmail.com>
Sun, 22 Mar 2020 13:55:15 +0000 (21:55 +0800)
commitda8012e69dde77d0389e466a3a68277ec5e88b0b
treed95f282689cfdaf567ef355424c129529ccd15dc
parent1944efc947ce40f49247fd7cf85177c2bea66a7d
btrfs/177: fix for nodesize 64K and type single

In the blockgroup type single with nodesize 64K, the relocation of
the bg containing the swapfile is not being attempted during the
resize. So due to this the resize is successful and does not
generate the required 'Text file busy' error message as in the
golden output and so the testcase fails.

Fix this by replacing the mkfs created chunk with the bigger kernel
created chunk using balance, and then fill it up to the full. Upsize
to 3x of fssize once instead of first to 2G and then to 3G. Also
drop the unnecessary downsize to 2G step.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/btrfs/177
tests/btrfs/177.out