bcachefs: Start copygc when first going read-write
authorKent Overstreet <kent.overstreet@linux.dev>
Mon, 17 Oct 2022 08:51:58 +0000 (04:51 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:50 +0000 (17:09 -0400)
commit5f5c74661713327309f124e247de61db6729bc3d
treed610d3875696b9303795a9a6e76abf7c84135599
parent30ca6ece88f2d11647c3854faf0dce528c32d5cf
bcachefs: Start copygc when first going read-write

In the distant past, it wasn't possible to start copygc until after
journal replay had finished. Now, the btree iterator code overlays keys
from the journal, so there's no reason not to start it earlier - and it
solves a rare deadlock.

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