btrfs-progs/mkfs
Qu Wenruo 90020a7605 btrfs-progs: mkfs: refactor how we handle sectorsize override
There are several problems for current sectorsize check:
- No check at all for sectorsize
  This means you can even specify "-s 62k".

- No way to specify sectorsize smaller than page size

Fix all these problems by:
- Introduce btrfs_check_sectorsize()
  To do:
  * power of 2 check for sectorsize
  * lower and upper boundary check for sectorsize
  * warn about sectorsize mismatch with page size

- Remove the max() between page size and sectorsize
  This allows us to override the sectorsize for 64K page systems.

- Make nodesize calculation based on sectorsize
  No need to use page size any more.
  Users who specify sectorsize manually really know what they are doing,
  and we have warned them already.

Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2020-12-10 17:10:30 +01:00
..
common.c btrfs-progs: move volumes.c to kernel-shared/ 2020-08-31 17:01:06 +02:00
common.h btrfs-progs: mkfs: switch to single as default profile for multiple-devices 2020-07-21 12:28:05 +02:00
main.c btrfs-progs: mkfs: refactor how we handle sectorsize override 2020-12-10 17:10:30 +01:00
Makefile btrfs-progs: build: add stub makefile to image and mkfs 2019-07-04 15:36:01 +02:00
rootdir.c btrfs-progs: move volumes.c to kernel-shared/ 2020-08-31 17:01:06 +02:00
rootdir.h btrfs-progs: mkfs/rootdir: Fix memory leak in traverse_directory() 2018-02-14 16:31:19 +01:00