]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
bcachefs: BCH_SB_FEATURES_ALL includes BCH_FEATURE_incompat_verison_field
authorKent Overstreet <kent.overstreet@linux.dev>
Mon, 10 Mar 2025 18:20:58 +0000 (14:20 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sat, 15 Mar 2025 01:02:15 +0000 (21:02 -0400)
These features are set on format and incompat upgarde.

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

index 13cc0833b488c43ca2931f56f960d910249e986c..8114ad9a3fe693f95ea07e6b79d04ea90ce4b400 100644 (file)
@@ -927,7 +927,8 @@ static inline void SET_BCH_SB_BACKGROUND_COMPRESSION_TYPE(struct bch_sb *sb, __u
         BIT_ULL(BCH_FEATURE_new_siphash)|              \
         BIT_ULL(BCH_FEATURE_btree_ptr_v2)|             \
         BIT_ULL(BCH_FEATURE_new_varint)|               \
-        BIT_ULL(BCH_FEATURE_journal_no_flush))
+        BIT_ULL(BCH_FEATURE_journal_no_flush)|         \
+        BIT_ULL(BCH_FEATURE_incompat_version_field))
 
 enum bch_sb_feature {
 #define x(f, n) BCH_FEATURE_##f,
index 5bd7bb90ee48d740c18fc0cf30c5880dacac2eda..7e726b3dc6f4c1c92e301b471991a9ca604031d8 100644 (file)
@@ -1214,12 +1214,11 @@ void bch2_sb_upgrade(struct bch_fs *c, unsigned new_version, bool incompat)
                bch2_sb_field_resize(&c->disk_sb, downgrade, 0);
 
        c->disk_sb.sb->version = cpu_to_le16(new_version);
-       c->disk_sb.sb->features[0] |= cpu_to_le64(BCH_SB_FEATURES_ALL);
 
        if (incompat) {
+               c->disk_sb.sb->features[0] |= cpu_to_le64(BCH_SB_FEATURES_ALL);
                SET_BCH_SB_VERSION_INCOMPAT_ALLOWED(c->disk_sb.sb,
                        max(BCH_SB_VERSION_INCOMPAT_ALLOWED(c->disk_sb.sb), new_version));
-               c->disk_sb.sb->features[0] |= cpu_to_le64(BCH_FEATURE_incompat_version_field);
        }
 }