summaryrefslogtreecommitdiff
path: root/fs/bcachefs/btree_update_interior.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2021-05-21 23:06:54 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-23 00:09:04 +0300
commit596d3bdc1e749c63e4defc6abbe2552d035e4470 (patch)
tree0d8d44fb69afdc92f37e81328f37ed6d40bc43c9 /fs/bcachefs/btree_update_interior.c
parent304b7e08c72ee20f315142047ee4e133102ab911 (diff)
downloadlinux-596d3bdc1e749c63e4defc6abbe2552d035e4470.tar.xz
bcachefs: Don't repair btree nodes until after interior journal replay is done
We need the btree to be in a consistent state before we can rewrite btree nodes. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/btree_update_interior.c')
-rw-r--r--fs/bcachefs/btree_update_interior.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/bcachefs/btree_update_interior.c b/fs/bcachefs/btree_update_interior.c
index ea1b09b36059..1f14f3e56aef 100644
--- a/fs/bcachefs/btree_update_interior.c
+++ b/fs/bcachefs/btree_update_interior.c
@@ -1828,6 +1828,9 @@ void bch2_btree_node_rewrite_async(struct bch_fs *c, struct btree *b)
{
struct async_btree_rewrite *a;
+ if (!test_bit(BCH_FS_BTREE_INTERIOR_REPLAY_DONE, &c->flags))
+ return;
+
if (!percpu_ref_tryget(&c->writes))
return;