From: Christoph Hellwig Date: Mon, 25 Nov 2024 21:14:12 +0000 (-0800) Subject: xfs: pass a pag to xfs_extent_busy_{search,reuse} X-Git-Tag: xfs-zoned-2025-01-08~321 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=90bdbe00d3d533d73c67192da0663b84abcc225c;p=users%2Fhch%2Fxfsprogs.git xfs: pass a pag to xfs_extent_busy_{search,reuse} Source kernel commit: b6dc8c6dd2d3f230e1a554f869d6df4568a2dfbb Replace the [mp,agno] tuple with the perag structure, which will become more useful later. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong --- diff --git a/libxfs/libxfs_priv.h b/libxfs/libxfs_priv.h index 97f5003ea..950580613 100644 --- a/libxfs/libxfs_priv.h +++ b/libxfs/libxfs_priv.h @@ -465,7 +465,7 @@ xfs_buf_readahead( #define XFS_EXTENT_BUSY_DISCARDED 0x01 /* undergoing a discard op. */ #define XFS_EXTENT_BUSY_SKIP_DISCARD 0x02 /* do not discard */ -#define xfs_extent_busy_reuse(mp,ag,bno,len,user) ((void) 0) +#define xfs_extent_busy_reuse(...) ((void) 0) /* avoid unused variable warning */ #define xfs_extent_busy_insert(tp,pag,bno,len,flags)({ \ struct xfs_perag *__foo = pag; \ diff --git a/libxfs/xfs_alloc.c b/libxfs/xfs_alloc.c index 19b38eaf4..ed04e4085 100644 --- a/libxfs/xfs_alloc.c +++ b/libxfs/xfs_alloc.c @@ -1248,7 +1248,7 @@ xfs_alloc_ag_vextent_small( if (fbno == NULLAGBLOCK) goto out; - xfs_extent_busy_reuse(args->mp, args->pag, fbno, 1, + xfs_extent_busy_reuse(args->pag, fbno, 1, (args->datatype & XFS_ALLOC_NOBUSY)); if (args->datatype & XFS_ALLOC_USERDATA) { @@ -3610,7 +3610,7 @@ xfs_alloc_vextent_finish( if (error) goto out_drop_perag; - ASSERT(!xfs_extent_busy_search(mp, args->pag, args->agbno, + ASSERT(!xfs_extent_busy_search(args->pag, args->agbno, args->len)); } diff --git a/libxfs/xfs_alloc_btree.c b/libxfs/xfs_alloc_btree.c index 4a711f246..949cd18ab 100644 --- a/libxfs/xfs_alloc_btree.c +++ b/libxfs/xfs_alloc_btree.c @@ -84,7 +84,7 @@ xfs_allocbt_alloc_block( } atomic64_inc(&cur->bc_mp->m_allocbt_blks); - xfs_extent_busy_reuse(cur->bc_mp, cur->bc_ag.pag, bno, 1, false); + xfs_extent_busy_reuse(cur->bc_ag.pag, bno, 1, false); new->s = cpu_to_be32(bno); diff --git a/libxfs/xfs_rmap_btree.c b/libxfs/xfs_rmap_btree.c index ada58e926..c261d6eae 100644 --- a/libxfs/xfs_rmap_btree.c +++ b/libxfs/xfs_rmap_btree.c @@ -101,7 +101,7 @@ xfs_rmapbt_alloc_block( return 0; } - xfs_extent_busy_reuse(cur->bc_mp, pag, bno, 1, false); + xfs_extent_busy_reuse(pag, bno, 1, false); new->s = cpu_to_be32(bno); be32_add_cpu(&agf->agf_rmap_blocks, 1);