]> www.infradead.org Git - users/jedix/linux-maple.git/commit
bcachefs: Start copygc, rebalance threads earlier
authorKent Overstreet <kent.overstreet@linux.dev>
Sun, 13 Apr 2025 10:44:23 +0000 (06:44 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Mon, 21 Apr 2025 15:57:24 +0000 (11:57 -0400)
commit387df331298eaa9d6dbb4e30f376d632dd798b46
treec69ffcbc13602b414c87466e71cf293141e83c06
parentd64e8e842bb18403d03a85b29caa5cb5f3bd4c7d
bcachefs: Start copygc, rebalance threads earlier

Previously, copygc and rebalance weren't started until the very end of
mounting, after all recvoery passes have finished.

But copygc really should be started earlier, since it may be needed for
allocations to make forward progress. Additionally, we've been seeing
occasional bug reports where starting the kthread fails due to a pending
signal - i.e. we're getting timed out by systemd (during a version
upgrade), but we're not seeing the signal until mount is about to
complete.

Additionally, we now have copygc/rebalance explicitly wait for
check_snapshots to complete (if being run); they require that for
snapshot_is_ancestor() in the data move path.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/movinggc.c
fs/bcachefs/rebalance.c
fs/bcachefs/recovery.c
fs/bcachefs/recovery_passes.c
fs/bcachefs/super.c