Re: [PATCH 4/5] xfs: improve dquot iteration for scrub

Christoph Hellwig
2023-11-30T05:25:23Z

On Fri, Nov 24, 2023 at 03:56:48PM -0800, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
>
> Upon a closer inspection of the quota record scrubber, I noticed that
> dqiterate wasn't actually walking all possible dquots for the mapped
> blocks in the quota file. This is due to xfs_qm_dqget_next skipping all
> XFS_IS_DQUOT_UNINITIALIZED dquots.
>
> For a fsck program, we really want to look at all the dquots, even if
> all counters and limits in the dquot record are zero. Rewrite the
> implementation to do this, as well as switching to an iterator paradigm
> to reduce the number of indirect calls.

Heh, this basically ends up doing what I suggested in the last patch
(and a lot more).

I'd just fold the previous patch into this one, as there's no point
in moving the function just to remove it immediately.

Otherwise looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>