[PATCH 3/4] bcachefs: rereplicate flushes interior updates

Kent Overstreet <[email protected]>
Newsgroups org.kernel.vger.linux-bcachefs
Message-ID <[email protected]>
We need to flush interior updates before gcing replicas entries,
otherwise we might still see replicas entries from in flight btree
updates.

Signed-off-by: Kent Overstreet <[email protected]>
---
 fs/bcachefs/move.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/bcachefs/move.c b/fs/bcachefs/move.c
index 3419e406f0c7..54dd6fec81db 100644
--- a/fs/bcachefs/move.c
+++ b/fs/bcachefs/move.c
@@ -1346,6 +1346,7 @@ int bch2_data_job(struct bch_fs *c,
 				     writepoint_hashed((unsigned long) current),
 				     true,
 				     rereplicate_pred, c) ?: ret;
+		bch2_btree_interior_updates_flush(c);
 		ret = bch2_replicas_gc2(c) ?: ret;
 		break;
 	case BCH_DATA_OP_migrate:
-- 
2.50.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.