xfs: Introduce macros to represent new maximum extent counts for data/attr forks

This commit defines new macros to represent maximum extent counts allowed by
filesystems which have support for large per-inode extent counters.

Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Chandan Babu R <chandan.babu@oracle.com>
This commit is contained in:
Chandan Babu R
2021-11-16 09:54:37 +00:00
parent 0c35e7ba18
commit df9ad5cc7a
6 changed files with 55 additions and 15 deletions

View File

@@ -744,7 +744,8 @@ xfs_iext_count_may_overflow(
if (whichfork == XFS_COW_FORK)
return 0;
max_exts = xfs_iext_max_nextents(whichfork);
max_exts = xfs_iext_max_nextents(xfs_inode_has_large_extent_counts(ip),
whichfork);
if (XFS_TEST_ERROR(false, ip->i_mount, XFS_ERRTAG_REDUCE_MAX_IEXTENTS))
max_exts = 10;