btrfs-progs/mkfs
Qu Wenruo 007c799ca8 btrfs-progs: mkfs: use sectorsize as nodesize fallback for mixed profiles
[BUG]
When running btrfs/011 with subpage case, even with RAID56 support, it
still fails with the following error:

 QA output created by 011
 *** test btrfs replace
 mkfs failed
 (see /home/adam/xfstests-dev/results//btrfs/011.full for details)

The full log shows:

  ---------workout "-m single -d single -M" 1 no 64-----------
  ERROR: illegal nodesize 65536 (not equal to 4096 for mixed block group)
  mkfs failed

This is a critical error, making test case to be aborted, without
checking the rest profiles.

[CAUSE]
Mkfs.btrfs always uses the maximum value between sectorsize and page
size for its mixed profile nodesize.

For subpage case, it means we always go PAGE_SIZE, no matter whatever
the sectorsize is passed in.

[FIX]
Just get rid of the direct PAGE_SIZE usage when determining nodesize for
mixed profiles.
And use sectorsize directly (either passed in by the user, or
determined from page size).

Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2022-04-26 01:14:48 +02:00
..
Makefile btrfs-progs: build: add stub makefile to image and mkfs 2019-07-04 15:36:01 +02:00
common.c btrfs-progs: zoned: fix initial system BG location 2022-04-08 23:17:35 +02:00
common.h btrfs-progs: mkfs: add support for the block group tree 2022-03-09 18:07:02 +01:00
main.c btrfs-progs: mkfs: use sectorsize as nodesize fallback for mixed profiles 2022-04-26 01:14:48 +02:00
rootdir.c btrfs-progs: stop passing root to csum related functions 2021-11-22 21:45:37 +01:00
rootdir.h btrfs-progs: unify GPL header comments 2021-09-07 13:58:44 +02:00