Re: [PATCH 3/5] xfs_scrub: fix threadcount estimates for phase 6

Christoph Hellwig
2024-03-26T16:36:27Z

On Tue, Mar 26, 2024 at 09:30:06AM -0700, Darrick J. Wong wrote:
> > Maybe add a comment to the code stating this?
>
> /*
> * Each read-verify pool starts a thread pool, and each worker thread
> * can contribute to the progress counter. Hence we need to set
> * nr_threads appropriately to handle that many threads.
> */
> *nr_threads = disk_heads(ctx->datadev);
> if (ctx->rtdev)
> *nr_threads += disk_heads(ctx->rtdev);
> if (ctx->logdev)
> *nr_threads += disk_heads(ctx->logdev);

Looks reaѕonable.