btrfs-progs/common
Qu Wenruo 82611f51a5 btrfs-progs: mkfs: only output the warning if the sectorsize is not supported
Currently mkfs.btrfs will output a warning message if the sectorsize is
not the same as page size:

  WARNING: the filesystem may not be mountable, sectorsize 4096 doesn't match page size 65536

But since btrfs subpage support for 64K page size is coming, this output
is populating the golden output of fstests, causing tons of false
alerts.

This patch will teach mkfs.btrfs to check
/sys/fs/btrfs/features/supported_sectorsizes and check if the sector
size is supported.

Then only output above warning message if the sector size is not
supported or the file is not found (ie. kernel does not export the file
yet).

Reviewed-by: Boris Burkov <boris@bur.io>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2021-05-06 16:40:51 +02:00
..
box.h btrfs-progs: build most common tools into one binary (busybox style) 2019-07-04 15:30:40 +02:00
defs.h btrfs-progs: move common-defs to common/ 2020-03-31 18:37:35 +02:00
device-scan.c btrfs-progs: move volumes.c to kernel-shared/ 2020-08-31 17:01:06 +02:00
device-scan.h btrfs-progs: refactor btrfs_scan_devices() to accept verbose argument 2020-06-12 19:31:58 +02:00
device-utils.c btrfs-progs: move disk-io.c to kernel-shared/ 2020-08-31 17:01:05 +02:00
device-utils.h btrfs-progs: utils: split device handling functions to own file 2019-07-04 02:06:34 +02:00
extent-cache.c btrfs-progs: move extent-cache.c to common/ 2020-08-31 17:01:04 +02:00
extent-cache.h btrfs-progs: move extent-cache.c to common/ 2020-08-31 17:01:04 +02:00
format-output.c btrfs-progs: change formatting for plain text lines 2021-02-22 16:22:21 +01:00
format-output.h btrfs-progs: lots of typo fixes (codespell) 2020-03-31 18:37:38 +02:00
fsfeatures.c btrfs-progs: mkfs: only output the warning if the sectorsize is not supported 2021-05-06 16:40:51 +02:00
fsfeatures.h btrfs-progs: mkfs: refactor how we handle sectorsize override 2020-12-10 17:10:30 +01:00
help.c btrfs-progs: split global help HELPINFO_INSERT_GLOBALS 2020-06-12 19:30:36 +02:00
help.h btrfs-progs: add global verbose and quiet options and helper functions 2020-06-12 19:30:43 +02:00
internal.h btrfs-progs: move internal.h to common/ 2019-07-03 20:49:03 +02:00
messages.c btrfs-progs: add global verbose and quiet options and helper functions 2020-06-12 19:30:43 +02:00
messages.h btrfs-progs: add separate verbosity level for on-by-default messages 2020-06-12 19:32:29 +02:00
path-utils.c btrfs-progs: receive: fix btrfs_mount_root substring bug 2021-02-19 16:29:40 +01:00
path-utils.h btrfs-progs: receive: fix btrfs_mount_root substring bug 2021-02-19 16:29:40 +01:00
rbtree-utils.c btrfs-progs: move rbtree-utils.[ch] to common/ 2019-07-03 20:49:04 +02:00
rbtree-utils.h btrfs-progs: move rbtree-utils.[ch] to common/ 2019-07-03 20:49:04 +02:00
send-stream.c btrfs-progs: align receive buffer to enable fast CRC 2021-01-18 17:49:22 +01:00
send-stream.h btrfs-progs: move send-stream.c to common/ 2020-08-31 17:01:04 +02:00
send-utils.c btrfs-progs: move path_cat_out helpers to path-utils 2020-11-04 23:26:43 +01:00
send-utils.h btrfs-progs: move ctree.c to kernel-shared/ 2020-08-31 17:01:05 +02:00
string-table.c btrfs-progs: move string-table.[ch] to common/ 2019-07-03 20:49:03 +02:00
string-table.h btrfs-progs: move string-table.[ch] to common/ 2019-07-03 20:49:03 +02:00
task-utils.c btrfs-progs: move task-utils.[ch] to common/ 2019-07-03 20:49:03 +02:00
task-utils.h btrfs-progs: move task-utils.[ch] to common/ 2019-07-03 20:49:03 +02:00
utils-lib.c btrfs-progs: move ctree.c to kernel-shared/ 2020-08-31 17:01:05 +02:00
utils.c btrfs-progs: mkfs: only output the warning if the sectorsize is not supported 2021-05-06 16:40:51 +02:00
utils.h btrfs-progs: mkfs: only output the warning if the sectorsize is not supported 2021-05-06 16:40:51 +02:00