mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-30 19:13:03 -04:00
btrfs: disable bs > ps support if no transparent hugepage support
Btrfs relies on mapping_set_folio_order_range() to set the minimal
folio order for all its data inodes, but that function will be no-op if
transparent hugepage is not enabled.
Guard the bs > ps support behind CONFIG_TRANSPARENT_HUGEPAGE, just like
all other filesystems.
Fixes: 98077f7f21 ("btrfs: enable experimental bs > ps support")
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
@@ -106,7 +106,8 @@ config BTRFS_EXPERIMENTAL
|
||||
|
||||
- extent tree v2 - complex rework of extent tracking
|
||||
|
||||
- block size > page size support
|
||||
- block size > page size support - needs transparent huge page and
|
||||
non-HIGHMEM system
|
||||
|
||||
- huge folios for data - folios can be as large as 2MiB now
|
||||
|
||||
|
||||
@@ -166,9 +166,17 @@ bool __attribute_const__ btrfs_supported_blocksize(u32 blocksize)
|
||||
*
|
||||
* Considering HIGHMEM is such a pain to deal with and it's going
|
||||
* to be deprecated eventually, just reject HIGHMEM && bs > ps cases.
|
||||
*
|
||||
* Finally, for bs > ps cases, we need to set the minimal folio order,
|
||||
* which requires transparent hugepage.
|
||||
*/
|
||||
if (IS_ENABLED(CONFIG_HIGHMEM) && blocksize > PAGE_SIZE)
|
||||
return false;
|
||||
if (blocksize > PAGE_SIZE) {
|
||||
if (IS_ENABLED(CONFIG_HIGHMEM))
|
||||
return false;
|
||||
|
||||
if (!IS_ENABLED(CONFIG_TRANSPARENT_HUGEPAGE))
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
#endif
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user