Re: [PATCH 07/10] xfs: support RT inodes in xfs_mod_delalloc

Darrick J. Wong
2024-02-23T17:29:32Z

On Fri, Feb 23, 2024 at 06:22:20PM +0100, Christoph Hellwig wrote:
> On Fri, Feb 23, 2024 at 09:20:28AM -0800, Darrick J. Wong wrote:
> > > + fsc->frextents -=
> > > + xfs_rtb_to_rtx(mp, percpu_counter_sum(&mp->m_delalloc_rtblks));
> >
> > Should m_delalloc_rtblks be measured in rt extents (and not fsblocks)
> > since a sub-rtx delalloc doesn't make any sense? As written, here we'd
> > also have to signal a corruption if (m_delalloc_rtblks % rextsize > 0).
>
> Either way should be fine. I did it this way around so that we only
> have to do the conversion in the slow path, but I can change it around.

I prefer that all the rt space counters have the same measurement
unit to avoid confusion later after we've all forgotten rt again. :)

--D