diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-06-27 23:34:02 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:10:06 -0400 |
commit | 3045bb958acf5d3bc799c791d14e40676477bd16 (patch) | |
tree | 96b0cb3ac2b3c92ef2179b0e74e32906aef252d7 /fs/bcachefs/opts.h | |
parent | 24964e1c5c89e00ca55909ab24ce8d28e2b46406 (diff) | |
download | linux-stable-3045bb958acf5d3bc799c791d14e40676477bd16.tar.gz linux-stable-3045bb958acf5d3bc799c791d14e40676477bd16.tar.bz2 linux-stable-3045bb958acf5d3bc799c791d14e40676477bd16.zip |
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 <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/opts.h')
-rw-r--r-- | fs/bcachefs/opts.h | 5 |
1 files changed, 3 insertions, 2 deletions
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, \ |