diff options
author | Chandan Babu R <chandan.babu@oracle.com> | 2021-08-09 12:05:22 +0530 |
---|---|---|
committer | Chandan Babu R <chandan.babu@oracle.com> | 2022-04-11 04:11:17 +0000 |
commit | 95f0b95e2b686ceaa3f465e9fa079f22e0fe7665 (patch) | |
tree | 6ad802b3e0cc7f9cccc1d7e051bc7d5c6f003955 /fs/xfs/scrub/bmap.c | |
parent | 3b0d9fd369ea48419ccb578e0bafa4c54df63ba6 (diff) |
xfs: Define max extent length based on on-disk format definition
The maximum extent length depends on maximum block count that can be stored in
a BMBT record. Hence this commit defines MAXEXTLEN based on
BMBT_BLOCKCOUNT_BITLEN.
While at it, the commit also renames MAXEXTLEN to XFS_MAX_BMBT_EXTLEN.
Suggested-by: Darrick J. Wong <djwong@kernel.org>
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/scrub/bmap.c')
-rw-r--r-- | fs/xfs/scrub/bmap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/scrub/bmap.c b/fs/xfs/scrub/bmap.c index a4cbbc346f60..c357593e0a02 100644 --- a/fs/xfs/scrub/bmap.c +++ b/fs/xfs/scrub/bmap.c @@ -350,7 +350,7 @@ xchk_bmap_iextent( irec->br_startoff); /* Make sure the extent points to a valid place. */ - if (irec->br_blockcount > MAXEXTLEN) + if (irec->br_blockcount > XFS_MAX_BMBT_EXTLEN) xchk_fblock_set_corrupt(info->sc, info->whichfork, irec->br_startoff); if (info->is_rt && |