bcachefs: bch2_alloc_write() should be writing for all devices
authorKent Overstreet <kent.overstreet@gmail.com>
Sat, 9 Jan 2021 02:20:58 +0000 (21:20 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:08:50 +0000 (17:08 -0400)
commit4291a3317f3724283023f35802c47083a05b938d
tree8b7cf9ad9c938c8a5769f1594324424cc3e0a05d
parentdcf64dfbbc3c3c46af5508afed9f46e906fcd748
bcachefs: bch2_alloc_write() should be writing for all devices

Alloc info isn't stored on a particular device, it makes no sense to
only be writing it out for rw members - this was causing fsck to not fix
alloc info errors, oops.

Also, make sure we write out alloc info in other repair paths.

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/bcachefs.h
fs/bcachefs/btree_gc.c
fs/bcachefs/recovery.c