bcachefs: Change copygc wait amount to be min of per device waits
authorKent Overstreet <kent.overstreet@gmail.com>
Tue, 27 Apr 2021 18:03:13 +0000 (14:03 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:02 +0000 (17:09 -0400)
commitd4b4422345fcb4e284260bd52166e189c137e846
treed21236145694b6485a0aa3610cc3ea6758a8057e
parentbaa6502905df0acb94afbf6c93f51a1f2aa4c7ca
bcachefs: Change copygc wait amount to be min of per device waits

We're seeing a filesystem get stuck when all devices but one have no
more reclaimable buckets - because the copygc wait amount is curretly
filesystem wide.

This patch should fix that, possibly at the expensive of running too
much when only one or a few devices is full and the rebalance thread
needs to move data around.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/movinggc.c