diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-07-10 13:42:26 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:10:06 -0400 |
commit | 065bd3356ce490ae9454d8b3c98ff298e13d09ac (patch) | |
tree | 968bb0d1b3135ca9d51cdf43c2a963bede5552ab /fs/bcachefs/super-io.h | |
parent | 6619d84626ff266721f4c3c24339c60ca8cb12e0 (diff) | |
download | lwn-065bd3356ce490ae9454d8b3c98ff298e13d09ac.tar.gz lwn-065bd3356ce490ae9454d8b3c98ff298e13d09ac.zip |
bcachefs: Version table now lists required recovery passes
Now that we've got forward compatibility sorted out, we should be doing
more frequent version upgrades in the future.
To avoid having to run a full fsck for every version upgrade, this
improves the BCH_METADATA_VERSIONS() table to explicitly specify a
bitmask of recovery passes to run when upgrading to or past a given
version.
This means we can also delete PASS_UPGRADE().
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/super-io.h')
-rw-r--r-- | fs/bcachefs/super-io.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/bcachefs/super-io.h b/fs/bcachefs/super-io.h index b365f088ba41..904adea6a0da 100644 --- a/fs/bcachefs/super-io.h +++ b/fs/bcachefs/super-io.h @@ -18,6 +18,10 @@ static inline bool bch2_version_compatible(u16 version) void bch2_version_to_text(struct printbuf *, unsigned); unsigned bch2_latest_compatible_version(unsigned); +u64 bch2_upgrade_recovery_passes(struct bch_fs *c, + unsigned, + unsigned); + struct bch_sb_field *bch2_sb_field_get(struct bch_sb *, enum bch_sb_field_type); struct bch_sb_field *bch2_sb_field_resize(struct bch_sb_handle *, enum bch_sb_field_type, unsigned); |