fs: add a filesystem flag for THPs

Linux Kernel / Linux Kernel - Matthew Wilcox (Oracle) [infradead.org] - 16 October 2020 18:11 UTC

The page cache needs to know whether the filesystem supports THPs so that it doesn't send THPs to filesystems which can't handle them. Dave Chinner points out that getting from the page mapping to the filesystem type is too many steps (mapping->host->i_sb->s_type->fs_flags) so cache that information in the address space flags.

01c70267053d fs: add a filesystem flag for THPs
fs/inode.c | 2 ++
include/linux/fs.h | 1 +
include/linux/pagemap.h | 6 ++++++
mm/shmem.c | 2 +-
4 files changed, 10 insertions(+), 1 deletion(-)

Upstream: git.kernel.org


  • Share