diff options
author | Chandan Babu R <chandan.babu@oracle.com> | 2020-08-27 15:09:10 +0530 |
---|---|---|
committer | Chandan Babu R <chandan.babu@oracle.com> | 2022-04-11 04:11:17 +0000 |
commit | 9feb8f19665c8ba051c6a81aa7897149e7748e1e (patch) | |
tree | 501f071896209b1c464e49d69a1f42f940b6f16b /fs/xfs/libxfs/xfs_inode_fork.c | |
parent | 95f0b95e2b686ceaa3f465e9fa079f22e0fe7665 (diff) | |
download | linux-9feb8f19665c8ba051c6a81aa7897149e7748e1e.tar.bz2 |
xfs: Introduce xfs_iext_max_nextents() helper
xfs_iext_max_nextents() returns the maximum number of extents possible for one
of data, cow or attribute fork. This helper will be extended further in a
future commit when maximum extent counts associated with data/attribute forks
are increased.
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>
Diffstat (limited to 'fs/xfs/libxfs/xfs_inode_fork.c')
-rw-r--r-- | fs/xfs/libxfs/xfs_inode_fork.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/libxfs/xfs_inode_fork.c b/fs/xfs/libxfs/xfs_inode_fork.c index 9149f4f796fc..e136c29a0ec1 100644 --- a/fs/xfs/libxfs/xfs_inode_fork.c +++ b/fs/xfs/libxfs/xfs_inode_fork.c @@ -744,7 +744,7 @@ xfs_iext_count_may_overflow( if (whichfork == XFS_COW_FORK) return 0; - max_exts = (whichfork == XFS_ATTR_FORK) ? MAXAEXTNUM : MAXEXTNUM; + max_exts = xfs_iext_max_nextents(whichfork); if (XFS_TEST_ERROR(false, ip->i_mount, XFS_ERRTAG_REDUCE_MAX_IEXTENTS)) max_exts = 10; |