bcachefs: Ensure devices are always correctly initialized
authorKent Overstreet <kent.overstreet@linux.dev>
Sat, 21 Oct 2023 17:54:39 +0000 (13:54 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Tue, 31 Oct 2023 16:18:37 +0000 (12:18 -0400)
commitbbe682c76789d679cb75effd7792d41b09efea00
tree26681b09b958dd337a5a349af0e219376da948f1
parentd0261559c434abbd7254c9c97c68f5e024daabf4
bcachefs: Ensure devices are always correctly initialized

We can't mark device superblocks or allocate journal on a device that
isn't online.

That means we may need to do this on every mount, because we may have
formatted a new filesystem and then done the first mount
(bch2_fs_initialize()) in degraded mode.

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