* [PATCH 0/2] btrfs: enable full bs <= ps support @ 2026-06-19 8:54 Qu Wenruo 2026-06-19 8:54 ` [PATCH 1/2] btrfs: remove the out-of-date comments on the 2K block size Qu Wenruo 2026-06-19 8:54 ` [PATCH 2/2] btrfs: allow any block size that is no larger than page size Qu Wenruo 0 siblings, 2 replies; 5+ messages in thread From: Qu Wenruo @ 2026-06-19 8:54 UTC (permalink / raw) To: linux-btrfs Btrfs has supported block size < page size for a while, but that is only when the block size is 4K. So for 64K page size, 8K/16K/32K block sizes are not supported no matter what. That's is completely an artificial limit, introduced just to reduce our test workload. But after all these years, we even have experimental bs > ps support now. There is really no reason not to support the extra block sizes. The first patch is a small comment update. The second one introduces the real change. Qu Wenruo (2): btrfs: remove the out-of-date comments on the 2K block size btrfs: allow any block size that is no larger than page size fs/btrfs/fs.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) -- 2.54.0 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] btrfs: remove the out-of-date comments on the 2K block size 2026-06-19 8:54 [PATCH 0/2] btrfs: enable full bs <= ps support Qu Wenruo @ 2026-06-19 8:54 ` Qu Wenruo 2026-06-19 9:04 ` Johannes Thumshirn 2026-06-19 8:54 ` [PATCH 2/2] btrfs: allow any block size that is no larger than page size Qu Wenruo 1 sibling, 1 reply; 5+ messages in thread From: Qu Wenruo @ 2026-06-19 8:54 UTC (permalink / raw) To: linux-btrfs Since commit bac3c2910c0c ("btrfs: remove 2K block size support") there is no 2K block size support inside btrfs anymore. Remove the stale comments of btrfS_supported_blocksize(). Signed-off-by: Qu Wenruo <wqu@suse.com> --- fs/btrfs/fs.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/fs/btrfs/fs.c b/fs/btrfs/fs.c index 14d83565cdee..907c8837a639 100644 --- a/fs/btrfs/fs.c +++ b/fs/btrfs/fs.c @@ -135,12 +135,6 @@ void btrfs_csum_final(struct btrfs_csum_ctx *ctx, u8 *out) * * - PAGE_SIZE * The straightforward block size to support. - * - * And extra support for the following block sizes based on the kernel config: - * - * - MIN_BLOCKSIZE - * This is either 4K (regular builds) or 2K (debug builds) - * This allows testing subpage routines on x86_64. */ bool __attribute_const__ btrfs_supported_blocksize(u32 blocksize) { -- 2.54.0 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] btrfs: remove the out-of-date comments on the 2K block size 2026-06-19 8:54 ` [PATCH 1/2] btrfs: remove the out-of-date comments on the 2K block size Qu Wenruo @ 2026-06-19 9:04 ` Johannes Thumshirn 0 siblings, 0 replies; 5+ messages in thread From: Johannes Thumshirn @ 2026-06-19 9:04 UTC (permalink / raw) To: Qu Wenruo, linux-btrfs On 6/19/26 10:54 AM, Qu Wenruo wrote: > Since commit bac3c2910c0c ("btrfs: remove 2K block size support") there > is no 2K block size support inside btrfs anymore. > > Remove the stale comments of btrfS_supported_blocksize(). Nit: s/btrfsS/btrfs/ Otherwise, Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/2] btrfs: allow any block size that is no larger than page size 2026-06-19 8:54 [PATCH 0/2] btrfs: enable full bs <= ps support Qu Wenruo 2026-06-19 8:54 ` [PATCH 1/2] btrfs: remove the out-of-date comments on the 2K block size Qu Wenruo @ 2026-06-19 8:54 ` Qu Wenruo 2026-06-19 9:08 ` Johannes Thumshirn 1 sibling, 1 reply; 5+ messages in thread From: Qu Wenruo @ 2026-06-19 8:54 UTC (permalink / raw) To: linux-btrfs Since v5.15 btrfs has support for block size < page size, but we still only support 4K block size, meanwhile there is no special reason that we can not support 8K/16K/32K block sizes for 64K page size. That 4K limit is completely artificial, and mostly to reduce test runtime so we do not need to test all the extra block size combinations. However that also limits the user choices, some users may understand what they are doing, and want larger block sizes. In that case, fixed 4K block size for subpage routine is blocking our way. Just remove that fixed 4K requirement for block size < page size. This should not affect regular end users, since mkfs is already using 4K block size as default for quite a while, and the existing bs == ps support is always there. But for power users, this allows extra block size support, and may provide extra test coverage. Signed-off-by: Qu Wenruo <wqu@suse.com> --- fs/btrfs/fs.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/fs/btrfs/fs.c b/fs/btrfs/fs.c index 907c8837a639..5015d0148841 100644 --- a/fs/btrfs/fs.c +++ b/fs/btrfs/fs.c @@ -127,14 +127,9 @@ void btrfs_csum_final(struct btrfs_csum_ctx *ctx, u8 *out) } /* - * We support the following block sizes for all systems: - * - * - 4K - * This is the most common block size. For PAGE SIZE > 4K cases the subpage - * mode is used. - * - * - PAGE_SIZE - * The straightforward block size to support. + * For regular builds, any block size <= page size is supported. + * For experimental builds, any block size between BTRFS_MIN_BLOCKSIZE + * and BTRFS_MAX_BLOCKSIZE (inclusive) is supported. */ bool __attribute_const__ btrfs_supported_blocksize(u32 blocksize) { @@ -142,7 +137,7 @@ bool __attribute_const__ btrfs_supported_blocksize(u32 blocksize) ASSERT(is_power_of_2(blocksize) && blocksize >= BTRFS_MIN_BLOCKSIZE && blocksize <= BTRFS_MAX_BLOCKSIZE); - if (blocksize == PAGE_SIZE || blocksize == SZ_4K || blocksize == BTRFS_MIN_BLOCKSIZE) + if (blocksize <= PAGE_SIZE) return true; #ifdef CONFIG_BTRFS_EXPERIMENTAL /* -- 2.54.0 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] btrfs: allow any block size that is no larger than page size 2026-06-19 8:54 ` [PATCH 2/2] btrfs: allow any block size that is no larger than page size Qu Wenruo @ 2026-06-19 9:08 ` Johannes Thumshirn 0 siblings, 0 replies; 5+ messages in thread From: Johannes Thumshirn @ 2026-06-19 9:08 UTC (permalink / raw) To: Qu Wenruo, linux-btrfs Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-06-19 9:09 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-06-19 8:54 [PATCH 0/2] btrfs: enable full bs <= ps support Qu Wenruo 2026-06-19 8:54 ` [PATCH 1/2] btrfs: remove the out-of-date comments on the 2K block size Qu Wenruo 2026-06-19 9:04 ` Johannes Thumshirn 2026-06-19 8:54 ` [PATCH 2/2] btrfs: allow any block size that is no larger than page size Qu Wenruo 2026-06-19 9:08 ` Johannes Thumshirn
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.