summaryrefslogtreecommitdiff
path: root/fs/xfs/scrub/reap.c
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2024-05-02 07:48:36 -0700
committerDarrick J. Wong <djwong@kernel.org>2024-05-02 07:48:36 -0700
commit204a26aa1d5a891154c9275fe4022e28793ca112 (patch)
tree528b87a86452f47b09f83b646808ac073f6d3c08 /fs/xfs/scrub/reap.c
parenta5714b67cad586f44777ad834e577037ce6b64fd (diff)
xfs: create a helper to compute the blockcount of a max sized remote value
Create a helper function to compute the number of fsblocks needed to store a maximally-sized extended attribute value. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Andrey Albershteyn <aalbersh@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/scrub/reap.c')
-rw-r--r--fs/xfs/scrub/reap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/xfs/scrub/reap.c b/fs/xfs/scrub/reap.c
index 01ceaa4efa16..be283153c254 100644
--- a/fs/xfs/scrub/reap.c
+++ b/fs/xfs/scrub/reap.c
@@ -223,7 +223,7 @@ xrep_bufscan_max_sectors(
int max_fsbs;
/* Remote xattr values are the largest buffers that we support. */
- max_fsbs = xfs_attr3_rmt_blocks(mp, XFS_XATTR_SIZE_MAX);
+ max_fsbs = xfs_attr3_max_rmt_blocks(mp);
return XFS_FSB_TO_BB(mp, min_t(xfs_extlen_t, fsblocks, max_fsbs));
}
@@ -806,7 +806,7 @@ xreap_bmapi_binval(
* of the next hole.
*/
off = imap->br_startoff + imap->br_blockcount;
- max_off = off + xfs_attr3_rmt_blocks(mp, XFS_XATTR_SIZE_MAX);
+ max_off = off + xfs_attr3_max_rmt_blocks(mp);
while (off < max_off) {
struct xfs_bmbt_irec hmap;
int nhmaps = 1;