diff mbox series

[3/3] xfs: don't call xfs_bmap_same_rtgroup in xfs_bmap_add_extent_hole_delay

Message ID 20241119154959.1302744-4-hch@lst.de (mailing list archive)
State New
Headers show
Series [1/3] xfs: factor out a xfs_rt_check_size helper | expand

Commit Message

Christoph Hellwig Nov. 19, 2024, 3:49 p.m. UTC
xfs_bmap_add_extent_hole_delay works entirely on delalloc extents, for
which xfs_bmap_same_rtgroup doesn't make sense.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 fs/xfs/libxfs/xfs_bmap.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Comments

Darrick J. Wong Nov. 19, 2024, 4:21 p.m. UTC | #1
On Tue, Nov 19, 2024 at 04:49:49PM +0100, Christoph Hellwig wrote:
> xfs_bmap_add_extent_hole_delay works entirely on delalloc extents, for
> which xfs_bmap_same_rtgroup doesn't make sense.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>

Oooooops :(
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>

--D

> ---
>  fs/xfs/libxfs/xfs_bmap.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c
> index 9052839305e2..5255f93bae31 100644
> --- a/fs/xfs/libxfs/xfs_bmap.c
> +++ b/fs/xfs/libxfs/xfs_bmap.c
> @@ -2620,8 +2620,7 @@ xfs_bmap_add_extent_hole_delay(
>  	 */
>  	if ((state & BMAP_LEFT_VALID) && (state & BMAP_LEFT_DELAY) &&
>  	    left.br_startoff + left.br_blockcount == new->br_startoff &&
> -	    left.br_blockcount + new->br_blockcount <= XFS_MAX_BMBT_EXTLEN &&
> -	    xfs_bmap_same_rtgroup(ip, whichfork, &left, new))
> +	    left.br_blockcount + new->br_blockcount <= XFS_MAX_BMBT_EXTLEN)
>  		state |= BMAP_LEFT_CONTIG;
>  
>  	if ((state & BMAP_RIGHT_VALID) && (state & BMAP_RIGHT_DELAY) &&
> @@ -2629,8 +2628,7 @@ xfs_bmap_add_extent_hole_delay(
>  	    new->br_blockcount + right.br_blockcount <= XFS_MAX_BMBT_EXTLEN &&
>  	    (!(state & BMAP_LEFT_CONTIG) ||
>  	     (left.br_blockcount + new->br_blockcount +
> -	      right.br_blockcount <= XFS_MAX_BMBT_EXTLEN)) &&
> -	    xfs_bmap_same_rtgroup(ip, whichfork, new, &right))
> +	      right.br_blockcount <= XFS_MAX_BMBT_EXTLEN)))
>  		state |= BMAP_RIGHT_CONTIG;
>  
>  	/*
> -- 
> 2.45.2
> 
>
diff mbox series

Patch

diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c
index 9052839305e2..5255f93bae31 100644
--- a/fs/xfs/libxfs/xfs_bmap.c
+++ b/fs/xfs/libxfs/xfs_bmap.c
@@ -2620,8 +2620,7 @@  xfs_bmap_add_extent_hole_delay(
 	 */
 	if ((state & BMAP_LEFT_VALID) && (state & BMAP_LEFT_DELAY) &&
 	    left.br_startoff + left.br_blockcount == new->br_startoff &&
-	    left.br_blockcount + new->br_blockcount <= XFS_MAX_BMBT_EXTLEN &&
-	    xfs_bmap_same_rtgroup(ip, whichfork, &left, new))
+	    left.br_blockcount + new->br_blockcount <= XFS_MAX_BMBT_EXTLEN)
 		state |= BMAP_LEFT_CONTIG;
 
 	if ((state & BMAP_RIGHT_VALID) && (state & BMAP_RIGHT_DELAY) &&
@@ -2629,8 +2628,7 @@  xfs_bmap_add_extent_hole_delay(
 	    new->br_blockcount + right.br_blockcount <= XFS_MAX_BMBT_EXTLEN &&
 	    (!(state & BMAP_LEFT_CONTIG) ||
 	     (left.br_blockcount + new->br_blockcount +
-	      right.br_blockcount <= XFS_MAX_BMBT_EXTLEN)) &&
-	    xfs_bmap_same_rtgroup(ip, whichfork, new, &right))
+	      right.br_blockcount <= XFS_MAX_BMBT_EXTLEN)))
 		state |= BMAP_RIGHT_CONTIG;
 
 	/*