From 97328a1a3c95ec90bed0221719ce1ba64544f6a8 Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Wed, 18 Mar 2020 11:40:07 -0400 Subject: [PATCH] bcachefs: BCH_FEATURE_new_extent_overwrite is now required The patch "bcachefs: Move extent overwrite handling out of core btree code" should have been flipping on this feature bit; extent btree nodes in the old format have to be rewritten before we can insert into them with the new extent update path. Not turning on this feature bit was causing us to go into an infinite loop where we keep rewriting btree nodes over and over. Signed-off-by: Kent Overstreet Signed-off-by: Kent Overstreet --- fs/bcachefs/super-io.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/bcachefs/super-io.c b/fs/bcachefs/super-io.c index 2db88afd6bda1..b50f85d1b0577 100644 --- a/fs/bcachefs/super-io.c +++ b/fs/bcachefs/super-io.c @@ -956,6 +956,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->compat[0] &= ~(1ULL << BCH_COMPAT_FEAT_ALLOC_METADATA); + c->disk_sb.sb->features[0] |= 1ULL << BCH_FEATURE_new_extent_overwrite; c->disk_sb.sb->features[0] |= 1ULL << BCH_FEATURE_extents_above_btree_updates; ret = bch2_write_super(c); mutex_unlock(&c->sb_lock); -- 2.30.2