Message ID | 20221213172935.680971-2-aalbersh@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | fs-verity support for XFS | expand |
On Tue, Dec 13, 2022 at 06:29:25PM +0100, Andrey Albershteyn wrote: > This is more appropriate place to set large folios flag as other > mapping's flags are set here. This will also allow to conditionally > enable large folios based on inode's diflags (e.g. fs-verity). > > Signed-off-by: Andrey Albershteyn <aalbersh@redhat.com> > --- > fs/xfs/xfs_icache.c | 2 -- > fs/xfs/xfs_iops.c | 2 ++ > 2 files changed, 2 insertions(+), 2 deletions(-) LGTM. Reviewed-by: Dave Chinner <dchinner@redhat.com>
diff --git a/fs/xfs/xfs_icache.c b/fs/xfs/xfs_icache.c index f35e2cee52655..8679739160507 100644 --- a/fs/xfs/xfs_icache.c +++ b/fs/xfs/xfs_icache.c @@ -88,7 +88,6 @@ 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); @@ -323,7 +322,6 @@ xfs_reinit_inode( inode->i_rdev = dev; inode->i_uid = uid; inode->i_gid = gid; - mapping_set_large_folios(inode->i_mapping); return error; } diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c index 10a5e85f2a709..9c90cfcecabc2 100644 --- a/fs/xfs/xfs_iops.c +++ b/fs/xfs/xfs_iops.c @@ -1292,6 +1292,8 @@ xfs_setup_inode( gfp_mask = mapping_gfp_mask(inode->i_mapping); mapping_set_gfp_mask(inode->i_mapping, (gfp_mask & ~(__GFP_FS))); + mapping_set_large_folios(inode->i_mapping); + /* * If there is no attribute fork no ACL can exist on this inode, * and it can't have any file capabilities attached to it either.
This is more appropriate place to set large folios flag as other mapping's flags are set here. This will also allow to conditionally enable large folios based on inode's diflags (e.g. fs-verity). Signed-off-by: Andrey Albershteyn <aalbersh@redhat.com> --- fs/xfs/xfs_icache.c | 2 -- fs/xfs/xfs_iops.c | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-)