diff options
| author | Pankaj Raghav <[email protected]> | 2024-08-22 15:50:18 +0200 |
|---|---|---|
| committer | Christian Brauner <[email protected]> | 2024-09-03 15:00:52 +0200 |
| commit | 7df7c204c678e24cd32d33360538670b7b90e330 (patch) | |
| tree | 9fc1af709d984fea1688cf55aae9b774419abc4f /include/linux | |
| parent | cebf9dacd5c3cec2813215a081509647f777ecc3 (diff) | |
xfs: enable block size larger than page size support
Page cache now has the ability to have a minimum order when allocating
a folio which is a prerequisite to add support for block size > page
size.
Signed-off-by: Pankaj Raghav <[email protected]>
Signed-off-by: Luis Chamberlain <[email protected]>
Link: https://lore.kernel.org/r/[email protected] # fix folded
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Darrick J. Wong <[email protected]>
Reviewed-by: Dave Chinner <[email protected]>
Signed-off-by: Christian Brauner <[email protected]>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/pagemap.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index 4cc170949e9c..55b254d951da 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h @@ -375,6 +375,19 @@ static inline void mapping_set_gfp_mask(struct address_space *m, gfp_t mask) #define MAX_PAGECACHE_ORDER min(MAX_XAS_ORDER, PREFERRED_MAX_PAGECACHE_ORDER) /* + * mapping_max_folio_size_supported() - Check the max folio size supported + * + * The filesystem should call this function at mount time if there is a + * requirement on the folio mapping size in the page cache. + */ +static inline size_t mapping_max_folio_size_supported(void) +{ + if (IS_ENABLED(CONFIG_TRANSPARENT_HUGEPAGE)) + return 1U << (PAGE_SHIFT + MAX_PAGECACHE_ORDER); + return PAGE_SIZE; +} + +/* * mapping_set_folio_order_range() - Set the orders supported by a file. * @mapping: The address space of the file. * @min: Minimum folio order (between 0-MAX_PAGECACHE_ORDER inclusive). |