+40
−55
Loading
Currently picking of the GC target zone is a bit odd as it is done both in the 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 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. We can select a GC zone just before writing, and bail out of starting new work if we can't find a usable zone. Signed-off-by:Christoph Hellwig <hch@lst.de> Reviewed-by:
Hans Holmberg <hans.holmberg@wdc.com> Reviewed-by:
Damien Le Moal <dlemoal@kernel.org> Reviewed-by:
Carlos Maiolino <cmaiolino@redhat.com> Signed-off-by:
Carlos Maiolino <cem@kernel.org>