Re: [PATCH 09/17] xfs_scrub: actually iterate all the bulkstat records

Christoph Hellwig
2025-02-07T04:40:09Z

On Thu, Feb 06, 2025 at 02:33:01PM -0800, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
>
> In scan_ag_bulkstat, we have a for loop that iterates all the
> xfs_bulkstat records in breq->bulkstat. The loop condition test should
> test against the array length, not the number of bits set in an
> unrelated data structure. If ocount > xi_alloccount then we miss some
> inodes; if ocount < xi_alloccount then we've walked off the end of the
> array.