Linux XFS filesystem development
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Christoph Hellwig <hch@lst.de>
Cc: Carlos Maiolino <cem@kernel.org>, linux-xfs@vger.kernel.org
Subject: Re: [PATCH 9/9] xfs: calculate end_fsb later in xfs_zoned_fill_srcmap
Date: Thu, 24 Sep 2026 13:29:19 -0700	[thread overview]
Message-ID: <20260924202919.GY2705364@frogsfrogsfrogs> (raw)
In-Reply-To: <20260924095740.2732474-10-hch@lst.de>

On Thu, Sep 24, 2026 at 11:57:10AM +0200, Christoph Hellwig wrote:
> xfs_trim_extent doesn't need the updated end_fsb as it already is
> limited by the smap range.  Move the end_fsb calculation later to
> prepare additional reasons that could reduce the smap range.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>

Make sense.  Constricting *end_fsb to the smap and then trimming the
smap to *end_fsb is (for now anyway) commutable.

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

--D

> ---
>  fs/xfs/xfs_iomap.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/xfs/xfs_iomap.c b/fs/xfs/xfs_iomap.c
> index 7bc17f179be7..6701be9325ef 100644
> --- a/fs/xfs/xfs_iomap.c
> +++ b/fs/xfs/xfs_iomap.c
> @@ -1613,8 +1613,8 @@ xfs_zoned_fill_srcmap(
>  	/*
>  	 * There is a data fork mapping, only map until the end of it.
>  	 */
> -	*end_fsb = min(*end_fsb, smap.br_startoff + smap.br_blockcount);
>  	xfs_trim_extent(&smap, offset_fsb, *end_fsb - offset_fsb);
> +	*end_fsb = min(*end_fsb, smap.br_startoff + smap.br_blockcount);
>  	return xfs_bmbt_to_iomap(ip, srcmap, &smap, flags, 0,
>  			xfs_iomap_inode_sequence(ip, 0));
>  }
> -- 
> 2.53.0
> 
> 

  reply	other threads:[~2026-09-24 20:29 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-24  9:57 misc cleanups Christoph Hellwig
2026-09-24  9:57 ` [PATCH 1/9] xfs: centralize setting of buf_ops/buf_type/magic for rtblocks Christoph Hellwig
2026-09-24 19:01   ` Darrick J. Wong
2026-09-24  9:57 ` [PATCH 2/9] xfs: factor out a xfs_rtfile_initialize_buf helper Christoph Hellwig
2026-09-24 19:02   ` Darrick J. Wong
2026-09-24  9:57 ` [PATCH 3/9] xfs: add a xfs_rtblock_payload helper Christoph Hellwig
2026-09-24 20:13   ` Darrick J. Wong
2026-09-24  9:57 ` [PATCH 4/9] xfs: cleanup xfs_verify_media_error Christoph Hellwig
2026-09-24 20:14   ` Darrick J. Wong
2026-09-24  9:57 ` [PATCH 5/9] xfs: use bdev_rw_virt in xfs_verify_media Christoph Hellwig
2026-09-24 20:18   ` Darrick J. Wong
2026-09-24  9:57 ` [PATCH 6/9] xfs: lift setting the NOFS context to xfs_end_io Christoph Hellwig
2026-09-24 20:18   ` Darrick J. Wong
2026-09-24  9:57 ` [PATCH 7/9] xfs: split xfs_end_ioend_write Christoph Hellwig
2026-09-24 20:26   ` Darrick J. Wong
2026-09-25  5:46     ` Christoph Hellwig
2026-09-24  9:57 ` [PATCH 8/9] xfs: factor out a xfs_zoned_fill_srcmap helper Christoph Hellwig
2026-09-24 20:27   ` Darrick J. Wong
2026-09-24  9:57 ` [PATCH 9/9] xfs: calculate end_fsb later in xfs_zoned_fill_srcmap Christoph Hellwig
2026-09-24 20:29   ` Darrick J. Wong [this message]
2026-10-05 18:06 ` misc cleanups Carlos Maiolino

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260924202919.GY2705364@frogsfrogsfrogs \
    --to=djwong@kernel.org \
    --cc=cem@kernel.org \
    --cc=hch@lst.de \
    --cc=linux-xfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox