]> www.infradead.org Git - users/willy/linux.git/commitdiff
xfs: Support large folios iomap-folio-5.17e
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Wed, 19 May 2021 22:38:43 +0000 (18:38 -0400)
committerMatthew Wilcox (Oracle) <willy@infradead.org>
Sat, 18 Dec 2021 05:06:08 +0000 (00:06 -0500)
Now that iomap has been converted, XFS is large folio safe.
Indicate to the VFS that it can now create large folios for XFS.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
fs/xfs/xfs_icache.c

index da4af2142a2b498a374733d5d1c2e0f3bd774af4..cdc39f576ca1ad02847fca66140d63ea7f5055f5 100644 (file)
@@ -87,6 +87,7 @@ xfs_inode_alloc(
        /* VFS doesn't initialise i_mode or i_state! */
        VFS_I(ip)->i_mode = 0;
        VFS_I(ip)->i_state = 0;
+       mapping_set_large_folios(VFS_I(ip)->i_mapping);
 
        XFS_STATS_INC(mp, vn_active);
        ASSERT(atomic_read(&ip->i_pincount) == 0);
@@ -320,6 +321,7 @@ xfs_reinit_inode(
        inode->i_rdev = dev;
        inode->i_uid = uid;
        inode->i_gid = gid;
+       mapping_set_large_folios(inode->i_mapping);
        return error;
 }