bcachefs: Normal update/commit path now works before going RW
authorKent Overstreet <kent.overstreet@gmail.com>
Sat, 19 Feb 2022 07:48:27 +0000 (02:48 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:25 +0000 (17:09 -0400)
commit78c8fe20be12d0e4b6427d9149fd1eb9a69e2290
tree72c720328ea264212feecd81b1ca1f72b28bf852
parentb66b2bc0f64a57c042ea1fa51dbd5904557bf67f
bcachefs: Normal update/commit path now works before going RW

This improves __bch2_trans_commit - early in the recovery process, when
we're running btree_gc and before we want to go RW, it now uses
bch2_journal_key_insert() to add the update to the list of updates for
journal replay to do, instead of btree_gc having to use separate
interfaces depending on whether we're running at bringup or, later,
runtime.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
fs/bcachefs/bcachefs.h
fs/bcachefs/btree_gc.c
fs/bcachefs/btree_update_leaf.c
fs/bcachefs/buckets.c
fs/bcachefs/recovery.c