Message ID | 20221213172935.680971-9-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: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@redhat.com> > --- > 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@redhat.com>
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,
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@redhat.com> --- fs/xfs/xfs_iops.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)