bcachefs: bch_sb.recovery_passes_required
authorKent Overstreet <kent.overstreet@linux.dev>
Fri, 29 Dec 2023 20:15:14 +0000 (15:15 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Mon, 1 Jan 2024 16:47:07 +0000 (11:47 -0500)
commit8b16413cda7c46d47f8071165b3071f8a9369199
treeaf7a5927c0676fc33c1e5c14f34ed5f8a8717d6d
parent808c680f2a256188951805f05c907d40919db37a
bcachefs: bch_sb.recovery_passes_required

Add two new superblock fields. Since the main section of the superblock
is now fully, we have to add a new variable length section for them -
bch_sb_field_ext.

 - recovery_passes_requried: recovery passes that must be run on the
   next mount
 - errors_silent: errors that will be silently fixed

These are to improve upgrading and dwongrading: these fields won't be
cleared until after recovery successfully completes, so there won't be
any issues with crashing partway through an upgrade or a downgrade.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/bcachefs.h
fs/bcachefs/bcachefs_format.h
fs/bcachefs/errcode.h
fs/bcachefs/error.c
fs/bcachefs/recovery.c
fs/bcachefs/sb-errors.c
fs/bcachefs/sb-errors.h
fs/bcachefs/super-io.c
fs/bcachefs/super-io.h