Re: [PATCH v2] xfs: fix off-by-one in rtrefcount btree root level validation
From: Xiang Mei
Date: Tue Jul 21 2026 - 13:40:26 EST
On Tue, Jul 21, 2026 at 3:44 AM Carlos Maiolino <cem@xxxxxxxxxx> wrote:
>
> On Tue, 14 Jul 2026 14:56:12 -0700, Xiang Mei wrote:
> > xfs_rtrefcountbt_compute_maxlevels() sets
> >
> > mp->m_rtrefc_maxlevels = min(d_maxlevels, r_maxlevels) + 1;
> >
> > where the trailing "+ 1" already accounts for the inode-root level, so the
> > deepest valid on-disk root level is m_rtrefc_maxlevels - 1 and a cursor must
> > satisfy bc_nlevels <= bc_maxlevels (= m_rtrefc_maxlevels).
> >
> > [...]
>
> Applied to for-next, thanks!
>
> [1/1] xfs: fix off-by-one in rtrefcount btree root level validation
> commit: fde50b32183f19041b4bab66c8f07b1cc38f8e26
>
> Best regards,
> --
> Carlos Maiolino <cem@xxxxxxxxxx>
>
Thank you for your review!
Xiang