bcachefs: Fix reading of alloc info after unclean shutdown
authorKent Overstreet <kent.overstreet@gmail.com>
Sun, 24 May 2020 18:06:10 +0000 (14:06 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:08:40 +0000 (17:08 -0400)
commitb29303966b9e07dda5f21c667909eb87849453f2
tree91c96f55bd15a711ad34a647ee2bd7cf42cd4cf3
parent692c3f0601bd1b04b914a40907a36e4c36dc8edd
bcachefs: Fix reading of alloc info after unclean shutdown

When updates to interior nodes started being journalled, that meant that
after an unclean shutdown, until journal replay is done we can't walk
the btree without overlaying the updates from the journal.

The initial btree gc was changed to walk the btree overlaying keys from
the journal - but bch2_alloc_read() and bch2_stripes_read() were missed.
Major whoops...

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