From: Christoph Hellwig <hch@infradead.org>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: Christoph Hellwig <hch@infradead.org>,
Carlos Maiolino <cem@kernel.org>, xfs <linux-xfs@vger.kernel.org>
Subject: Re: [PATCH] xfs: don't set bt_nr_sectors to a negative number
Date: Mon, 13 Oct 2025 21:13:46 -0700 [thread overview]
Message-ID: <aO3N-pndkWtbkawz@infradead.org> (raw)
In-Reply-To: <20251013163310.GM6188@frogsfrogsfrogs>
On Mon, Oct 13, 2025 at 09:33:10AM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
>
> xfs_daddr_t is a signed type, which means that xfs_buf_map_verify is
> using a signed comparison. This causes problems if bt_nr_sectors is
> never overridden (e.g. in the case of an xfbtree for rmap btree repairs)
> because even daddr 0 can't pass the verifier test in that case.
>
> Define an explicit max constant and set the initial bt_nr_sectors to a
> positive value.
Looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
next prev parent reply other threads:[~2025-10-14 4:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-13 16:33 [PATCH] xfs: don't set bt_nr_sectors to a negative number Darrick J. Wong
2025-10-14 4:13 ` Christoph Hellwig [this message]
2025-10-14 6:47 ` Nirjhar Roy (IBM)
2025-10-14 18:20 ` Darrick J. Wong
2025-10-15 6:08 ` Nirjhar Roy (IBM)
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=aO3N-pndkWtbkawz@infradead.org \
--to=hch@infradead.org \
--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;
as well as URLs for NNTP newsgroup(s).