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 1/2] xfs: track the number of blocks in each buftarg
Date: Mon, 13 Oct 2025 08:29:42 +0200 [thread overview]
Message-ID: <20251013062942.GA1886@lst.de> (raw)
In-Reply-To: <20251013054647.GI6188@frogsfrogsfrogs>
On Sun, Oct 12, 2025 at 10:46:47PM -0700, Darrick J. Wong wrote:
> I just pulled 6.18-rc1 and noticed that the rmapbt repair now dumps a
> bunch of warnings about daddr 0 being "beyond" EOFS in the xfbtree that
> holds the in-memory rmap data.
>
> I think the reason for this is that xfs_daddr_t is actually a s64 value,
> so the comparison in xfs_buf_map_verify
>
> if (map->bm_bn < 0 || map->bm_bn >= btp->bt_nr_sectors) {
>
> is actually comparing 0 against -1, so the second part of the if test is
> actually true. I'm not sure what a good fix here would be? Maybe
>
> #define XFS_DADDR_MAX ((xfs_daddr_t)S64_MAX)
>
> and then
>
> /* The maximum size of the buftarg is only known once the sb is read. */
> btp->bt_nr_sectors = XFS_DADDR_MAX;
>
> Hm?
Oh, right the switch to use a xfs_daddr_t means the value is signed
now, and the -1 cast won't get the max value. Your idea sounds good
to me, do you want to send a patch or should I?
next prev parent reply other threads:[~2025-10-13 6:29 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-19 13:12 store the buftarg size in the buftarg v4 Christoph Hellwig
2025-09-19 13:12 ` [PATCH 1/2] xfs: track the number of blocks in each buftarg Christoph Hellwig
2025-09-19 17:52 ` Darrick J. Wong
2025-10-13 5:46 ` Darrick J. Wong
2025-10-13 6:29 ` Christoph Hellwig [this message]
2025-10-13 14:54 ` Darrick J. Wong
2025-09-19 13:12 ` [PATCH 2/2] xfs: use bt_nr_sectors in xfs_dax_translate_range Christoph Hellwig
2025-09-22 12:41 ` store the buftarg size in the buftarg v4 Carlos Maiolino
-- strict thread matches above, loose matches on Subject: below --
2025-09-16 13:52 store the buftarg size in the buftarg v3 Christoph Hellwig
2025-09-16 13:52 ` [PATCH 1/2] xfs: track the number of blocks in each buftarg Christoph Hellwig
2025-09-17 21:26 ` Dave Chinner
2025-08-25 11:19 store the buftarg size in the buftarg v2 Christoph Hellwig
2025-08-25 11:19 ` [PATCH 1/2] xfs: track the number of blocks in each buftarg Christoph Hellwig
2025-08-25 15:26 ` Darrick J. Wong
2025-08-26 13:28 ` Christoph Hellwig
2025-08-26 5:42 ` Dave Chinner
2025-08-26 13:29 ` Christoph Hellwig
2025-08-18 5:11 store the buftarg size in the buftarg Christoph Hellwig
2025-08-18 5:11 ` [PATCH 1/2] xfs: track the number of blocks in each buftarg Christoph Hellwig
2025-08-18 20:48 ` Darrick J. Wong
2025-08-19 8:06 ` Christoph Hellwig
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=20251013062942.GA1886@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