Re: [RFC PATCH 08/11] xfs: don't enable large folios on fs-verity sealed inode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Dec 13, 2022 at 06:29:32PM +0100, Andrey Albershteyn wrote:
> fs-verity doesn't work with large folios. Don't enable large folios
> on those inode which are already sealed with fs-verity (indicated by
> diflag).
> 
> Signed-off-by: Andrey Albershteyn <aalbersh@xxxxxxxxxx>
> ---
>  fs/xfs/xfs_iops.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c
> index b229d25c1c3d6..a4c8db588690e 100644
> --- a/fs/xfs/xfs_iops.c
> +++ b/fs/xfs/xfs_iops.c
> @@ -1294,7 +1294,12 @@ 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);
> +	/*
> +	 * As fs-verity doesn't support folios so far, we won't enable them on
> +	 * sealed inodes
> +	 */
> +	if (!IS_VERITY(inode))
> +		mapping_set_large_folios(inode->i_mapping);
>  
>  	/*
>  	 * If there is no attribute fork no ACL can exist on this inode,

Looks reasonable to me.

Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx>

-- 
Dave Chinner
david@xxxxxxxxxxxxx



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux