Commit 2680325b authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: Mask out unknown compat features when going read-write

Compat features should be cleared if the filesystem was touched by a
version that doesn't support them.
Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
parent 19d54324
......@@ -985,6 +985,7 @@ int bch2_fs_mark_dirty(struct bch_fs *c)
mutex_lock(&c->sb_lock);
SET_BCH_SB_CLEAN(c->disk_sb.sb, false);
c->disk_sb.sb->features[0] |= cpu_to_le64(BCH_SB_FEATURES_ALWAYS);
c->disk_sb.sb->compat[0] &= cpu_to_le64((1ULL << BCH_COMPAT_NR) - 1);
ret = bch2_write_super(c);
mutex_unlock(&c->sb_lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment