Re: [PATCH 6/7] xfs: streamline GC zone selection

Damien Le Moal
2026-03-31T09:48:48Z

On 3/30/26 14:44, Christoph Hellwig wrote:
> Currently picking of the GC target zone is done a bit odd, both in the

s/is done a bit odd/is a bit odd

> main "can we start new GC cycles" routine and in the low-level block
> allocator for GC. This was mostly done to work around the rules for
> when code in a waitqueue wait loop can sleep.
>
> But there is a trick to check if the process state has been set to
> running to discover if the wait loop has to be retried all this becomes
> much simpler. So we can just select a GC zone just before writing,

But with a trick to check if the process state has been set to running to
discover if the wait loop has to be retried, all this becomes
much simpler.

may be better I think.

> and bail out of starting new work if we can't find usable zone.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>

With that:

Reviewed-by: Damien Le Moal <dlemoal@kernel.org>

--
Damien Le Moal
Western Digital Research