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: 98077f7f2180 ("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>
- 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
*
* 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;