From: "Darrick J. Wong" <djwong@kernel.org>
To: Christoph Hellwig <hch@lst.de>
Cc: cem@kernel.org, stable@vger.kernel.org, linux-xfs@vger.kernel.org
Subject: Re: [PATCH 6/6] xfs: don't zap bmbt forks if they are MAXLEVELS tall
Date: Tue, 14 Jul 2026 09:40:19 -0700 [thread overview]
Message-ID: <20260714164019.GE7398@frogsfrogsfrogs> (raw)
In-Reply-To: <20260714061652.GG1072@lst.de>
On Tue, Jul 14, 2026 at 08:16:52AM +0200, Christoph Hellwig wrote:
> On Mon, Jul 13, 2026 at 11:07:30PM -0700, Darrick J. Wong wrote:
> > From: Darrick J. Wong <djwong@kernel.org>
> >
> > LOLLM noticed a discrepancy between the bmbt level checks in the libxfs
> > bmbt code vs. the inode repair code. We do actually allow a bmbt root
> > that proclaims to have a height of XFS_BM_MAXLEVELS.
>
> Looks good:
>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
>
> I guess we need a test that actually creates such a deep tree. But
> we'll probably run out space / extents before..
The bmapinflate command in xfs_db does this by writing a new bmap btree
with as many mappings pointing to the same "reflinked" block as you ask.
The only problem is that to hit maxlevels, you need to create a 1k
fsblock filesystem and then bmapinflate 2^54 records, which will take a
long time and require much memory. Back in the day when Chandan was
working on nrext64 I tried this and it took 2 days and 400G of RAM to
write the huge bmap btree out to disk and generate the appropriate
rmap/reflink btrees.
--D
prev parent reply other threads:[~2026-07-14 16:40 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-14 6:04 [PATCHSET 2/2] xfs: LLM-inspired bug fixes, part 2 Darrick J. Wong
2026-07-14 6:06 ` [PATCH 1/6] xfs: set xfarray killable sort correctly Darrick J. Wong
2026-07-14 6:11 ` Christoph Hellwig
2026-07-14 16:42 ` Darrick J. Wong
2026-07-14 6:06 ` [PATCH 2/6] xfs: fix off-by-one error when calling xchk_xref_has_rt_owner Darrick J. Wong
2026-07-14 6:12 ` Christoph Hellwig
2026-07-14 6:06 ` [PATCH 3/6] xfs: handle non-inode owners for rtrmap record checking Darrick J. Wong
2026-07-14 6:14 ` Christoph Hellwig
2026-07-14 16:32 ` Darrick J. Wong
2026-07-14 6:06 ` [PATCH 4/6] xfs: fully check the parent handle when it points to the rootdir Darrick J. Wong
2026-07-14 6:14 ` Christoph Hellwig
2026-07-14 6:07 ` [PATCH 5/6] xfs: clamp timestamp nanoseconds correctly Darrick J. Wong
2026-07-14 6:15 ` Christoph Hellwig
2026-07-14 16:34 ` Darrick J. Wong
2026-07-14 6:07 ` [PATCH 6/6] xfs: don't zap bmbt forks if they are MAXLEVELS tall Darrick J. Wong
2026-07-14 6:16 ` Christoph Hellwig
2026-07-14 16:40 ` Darrick J. Wong [this message]
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=20260714164019.GE7398@frogsfrogsfrogs \
--to=djwong@kernel.org \
--cc=cem@kernel.org \
--cc=hch@lst.de \
--cc=linux-xfs@vger.kernel.org \
--cc=stable@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