Commit fb195fa7 authored by Kent Overstreet's avatar Kent Overstreet
Browse files

bcachefs: BCH_SB_FEATURES_ALL includes BCH_FEATURE_incompat_verison_field



These features are set on format and incompat upgarde.

Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent a42d685f
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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,
+1 −2
Original line number Diff line number Diff line
@@ -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);
	}
}