bcachefs: Correctly initialize new buckets on device resize
authorKent Overstreet <kent.overstreet@linux.dev>
Thu, 28 Sep 2023 21:57:21 +0000 (17:57 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:10:16 +0000 (17:10 -0400)
commit69d1f052d1675c2af7da496f0265f68673328afb
treee064572300707f5719a8dcb8467745540010293c
parent4fc1f402c6c259b1f44e45c096ac6666925a9b87
bcachefs: Correctly initialize new buckets on device resize

bch2_dev_resize() was never updated for the allocator rewrite with
persistent freelists, and it wasn't noticed because the tests weren't
running fsck - oops.

Fix this by running bch2_dev_freespace_init() for the new buckets.

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