public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: Christoph Hellwig <hch@lst.de>, Carlos Maiolino <cem@kernel.org>,
	linux-xfs@vger.kernel.org
Subject: Re: [PATCH 2/3] xfs: use the proper conversion helpers in xfs_rt_check_size
Date: Tue, 19 Nov 2024 17:23:57 +0100	[thread overview]
Message-ID: <20241119162357.GA15163@lst.de> (raw)
In-Reply-To: <20241119162142.GX9438@frogsfrogsfrogs>

On Tue, Nov 19, 2024 at 08:21:42AM -0800, Darrick J. Wong wrote:
> > -	xfs_daddr_t		daddr = XFS_FSB_TO_BB(mp, last_block);
> > +	xfs_daddr_t		daddr = xfs_rtb_to_daddr(mp, last_block);
> >  	struct xfs_buf		*bp;
> >  	int			error;
> >  
> > -	if (XFS_BB_TO_FSB(mp, daddr) != last_block) {
> > +	if (xfs_daddr_to_rtb(mp, daddr) != last_block) {
> 
> Er... this converts the daddr to a segmented xfs_rtblock_t type, but
> last_block is a non segmented xfs_rfsblock_t type.  You can't compare
> the two directly.  I think the code was correct without this patch.

Hmm.  Yeah, it just breaks the other things I'm about to overload
xfs_rtb_to_daddr/xfs_daddr_to_rtb with..  Time for even more
helpers probably..


  reply	other threads:[~2024-11-19 16:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-19 15:49 small fixes for 6.13 Christoph Hellwig
2024-11-19 15:49 ` [PATCH 1/3] xfs: factor out a xfs_rt_check_size helper Christoph Hellwig
2024-11-19 16:15   ` Darrick J. Wong
2024-11-19 16:18     ` Christoph Hellwig
2024-11-19 15:49 ` [PATCH 2/3] xfs: use the proper conversion helpers in xfs_rt_check_size Christoph Hellwig
2024-11-19 16:21   ` Darrick J. Wong
2024-11-19 16:23     ` Christoph Hellwig [this message]
2024-11-19 15:49 ` [PATCH 3/3] xfs: don't call xfs_bmap_same_rtgroup in xfs_bmap_add_extent_hole_delay Christoph Hellwig
2024-11-19 16:21   ` Darrick J. Wong

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=20241119162357.GA15163@lst.de \
    --to=hch@lst.de \
    --cc=cem@kernel.org \
    --cc=djwong@kernel.org \
    --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