You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
btrfs-progs: fsck-tests: make the warning check more specific for 057
[BUG]
On older kernels without the fix ae4477f93756 ("btrfs: update
superblock's device bytes_used when dropping chunk"), the test case 057
will result super block device item to mismatch with the chunk one.
Normally this is not a big deal, but newer btrfs-progs will check for
such mismatch.
Although newer btrfs-progs won't report this as an error, the test case
fsck/057 will manually check for any warnings, and fail the test case:
====== RUN CHECK /home/runner/work/btrfs-progs/btrfs-progs/btrfs check /dev/loop1
[1/8] checking log skipped (none written)
[2/8] checking root items
[3/8] checking extents
WARNING: device 2's bytes_used was 503316480 in tree but 570425344 in superblock
[4/8] checking free space tree
[5/8] checking fs roots
[6/8] checking only csums items (without verifying data)
[7/8] checking root refs
[8/8] checking quota groups skipped (not enabled on this FS)
Opening filesystem to check...
Checking filesystem on /dev/loop1
UUID: efd3e3b9-2fac-4a6f-b378-34694dc2d446
found 147456 bytes used, no error found
total csum bytes: 0
total tree bytes: 147456
total fs tree bytes: 32768
total extent tree bytes: 16384
btree space waste bytes: 139992
file data blocks allocated: 0
referenced 0
That WARNING line will fail the test case, even if we didn't error out.
[CAUSE]
The test case itself is a test case for btrfs-progs commit 0dc8b8b
("btrfs-progs: check: fix wrong total bytes check for seed device"),
which will report minor warning like the following:
[2/7] checking extents
WARNING: minor unaligned/mismatch device size detected
WARNING: recommended to use 'btrfs rescue fix-device-size' to fix it
But in this particular case, 057 should only check for the related
wanrings, not something caused by the kernel.
[FIX]
Make the warning check in fsck/057 more specific, instead of "WARNING"
use "fix-device-size" as the keyword.
This is an unfortunate workaround for the CI kernels, which doesn't have
fast enough backport of upstream kernel fixes.
Reviewed-by: Boris Burkov <[email protected]>
Signed-off-by: Qu Wenruo <[email protected]>
0 commit comments