diff options
| author | Darrick J. Wong <djwong@kernel.org> | 2026-09-01 22:43:34 -0700 |
|---|---|---|
| committer | Carlos Maiolino <cem@kernel.org> | 2026-09-07 07:50:35 +0200 |
| commit | 022d5f5fce7f0b6125d404eb74044e6238aef369 (patch) | |
| tree | ce29b98dbb2836725d3e0416ba1e682460a5250b /scripts/patch-kernel | |
| parent | aa301322f72f82f26e4ba0826018d41388ab9896 (diff) | |
xfs: fix xfs_rtrmapbt_mem_cursor for non-rmap filesystems
It's possible to construct an in-memory rtrmap btree for filesystems
that don't have the rmap feature enabled. The kernel doesn't do this,
but xfs_repair will, if asked to reindex a filesystem that has rtreflink
enabled but not rtrmap. Therefore, we must create the cursor with
enough levels to handle a maximally sized btree possible.
Note that the rtrmapbt btree cursor slab creates objects large enough to
handle xfs_rtrmap_maxlevels_ondisk() levels, so setting bc_nlevels to
the same value isn't costing us any extra memory.
Cc: stable@vger.kernel.org # v6.14
Fixes: 4a61f12eb11958 ("xfs: create a shadow rmap btree during realtime rmap repair")
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
Diffstat (limited to 'scripts/patch-kernel')
0 files changed, 0 insertions, 0 deletions
