[FAILURE]
With the incoming shutdown ioctl and remove_bdev callback support, btrfs
is able to run the shutdown group.
However test case like generic/042 fails on btrfs:
generic/042 9s ... [failed, exit status 1]- output mismatch (see /home/adam/xfstests/results//generic/042.out.bad)
--- tests/generic/042.out 2022-05-11 11:25:30.
763333331 +0930
+++ /home/adam/xfstests/results//generic/042.out.bad 2025-06-26 08:43:56.
078509452 +0930
@@ -1,10 +1 @@
QA output created by 042
-falloc -k
-wrote 65536/65536 bytes at offset 0
-XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-fpunch
-wrote 65536/65536 bytes at offset 0
-XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
...
(Run 'diff -u /home/adam/xfstests/tests/generic/042.out /home/adam/xfstests/results//generic/042.out.bad' to see the entire diff)
Ran: generic/042
Failures: generic/042
Failed 1 of 1 tests
[CAUSE]
The full output shows the reason directly:
ERROR: '/mnt/scratch/042.img' is too small to make a usable filesystem
ERROR: minimum size for each btrfs device is
114294784
And the helper _small_fs_size_mb() doesn't support btrfs, thus the small
25M file is not large enough to support a btrfs.
[FIX]
Fix the false alert by adding btrfs support in _small_fs_size_mb().
The btrfs minimal size is depending on the profiles even on a single
device, e.g. DUP data will cost extra space.
So here we go safe by using 512MiB as the minimal size for btrfs.
Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Naohiro Aota <naohiro.aota@wdc.com>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>