mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
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>
This commit is contained in:
@@ -2511,7 +2511,7 @@ __xfs_free_extent_later(
|
||||
|
||||
ASSERT(bno != NULLFSBLOCK);
|
||||
ASSERT(len > 0);
|
||||
ASSERT(len <= MAXEXTLEN);
|
||||
ASSERT(len <= XFS_MAX_BMBT_EXTLEN);
|
||||
ASSERT(!isnullstartblock(bno));
|
||||
agno = XFS_FSB_TO_AGNO(mp, bno);
|
||||
agbno = XFS_FSB_TO_AGBNO(mp, bno);
|
||||
|
||||
Reference in New Issue
Block a user