]> www.infradead.org Git - users/jedix/linux-maple.git/commit
btrfs: add sysfs interface for supported sectorsize
authorQu Wenruo <wqu@suse.com>
Thu, 25 Mar 2021 07:14:33 +0000 (15:14 +0800)
committerDavid Sterba <dsterba@suse.com>
Tue, 6 Apr 2021 13:35:57 +0000 (15:35 +0200)
commite847a1ae3ea6abad156b3bffd49c322e8300b28f
treec25a17108d71db6ea9922257c290ac412508c135
parent480713fab1336507cc5ba97f30cd3086d02a9b8c
btrfs: add sysfs interface for supported sectorsize

Export supported sector sizes in /sys/fs/btrfs/features/supported_sectorsizes.

Currently all architectures have PAGE_SIZE, There's some disparity
between read-only and read-write support but that will be unified in the
future so there's only one file exporting the size.

The read-only support for systems with 64K pages also works for 4K
sector size.

This new sysfs interface would help eg. mkfs.btrfs to print more
accurate warnings about potentially incompatible option combinations.

Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/sysfs.c