From 3045bb958acf5d3bc799c791d14e40676477bd16 Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Tue, 27 Jun 2023 23:34:02 -0400 Subject: bcachefs: version_upgrade is now an enum The version_upgrade parameter is now an enum, not a bool, and it's persistent in the superblock: - compatible (default): upgrade to the latest compatible version - incompatible: upgrade to latest incompatible version - none Currently all upgrades are incompatible upgrades, but the next release will introduce major:minor versions. Signed-off-by: Kent Overstreet --- fs/bcachefs/opts.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'fs/bcachefs/opts.h') diff --git a/fs/bcachefs/opts.h b/fs/bcachefs/opts.h index e7cf7e92f3db..e105a742fd44 100644 --- a/fs/bcachefs/opts.h +++ b/fs/bcachefs/opts.h @@ -9,6 +9,7 @@ #include "bcachefs_format.h" extern const char * const bch2_error_actions[]; +extern const char * const bch2_version_upgrade_opts[]; extern const char * const bch2_sb_features[]; extern const char * const bch2_sb_compat[]; extern const char * const bch2_btree_ids[]; @@ -388,8 +389,8 @@ enum opt_type { NULL, "Reconstruct alloc btree") \ x(version_upgrade, u8, \ OPT_FS|OPT_MOUNT, \ - OPT_BOOL(), \ - BCH2_NO_SB_OPT, false, \ + OPT_STR(bch2_version_upgrade_opts), \ + BCH_SB_VERSION_UPGRADE, BCH_VERSION_UPGRADE_compatible, \ NULL, "Set superblock to latest version,\n" \ "allowing any new features to be used") \ x(buckets_nouse, u8, \ -- cgit v1.2.3