From 45e4cd9e3a088d476929c5ee245e83baeee6cdd5 Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Thu, 24 Feb 2022 08:08:53 -0500 Subject: bcachefs: run_one_trigger() now checks journal keys Previously, when doing updates and running triggers before journal replay completes, triggers would see the incorrect key for the old key being overwritten - this patch updates the trigger code to check the journal keys when necessary, needed for the upcoming allocator rewrite. Signed-off-by: Kent Overstreet --- fs/bcachefs/recovery.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'fs/bcachefs/recovery.h') diff --git a/fs/bcachefs/recovery.h b/fs/bcachefs/recovery.h index 21bdad9db249..e6927a918df3 100644 --- a/fs/bcachefs/recovery.h +++ b/fs/bcachefs/recovery.h @@ -33,6 +33,8 @@ struct btree_and_journal_iter { size_t bch2_journal_key_search(struct journal_keys *, enum btree_id, unsigned, struct bpos); +struct bkey_i *bch2_journal_keys_peek(struct bch_fs *, enum btree_id, + unsigned, struct bpos pos); int bch2_journal_key_insert_take(struct bch_fs *, enum btree_id, unsigned, struct bkey_i *); -- cgit v1.2.3