diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2022-02-24 08:08:53 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:23 -0400 |
commit | 45e4cd9e3a088d476929c5ee245e83baeee6cdd5 (patch) | |
tree | 8ca589c1c5eb97cc437aeb508e1fb5447458ee07 /fs/bcachefs/recovery.h | |
parent | 2e63e180665d527f52b2200acca4aeced065e63f (diff) |
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 <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/recovery.h')
-rw-r--r-- | fs/bcachefs/recovery.h | 2 |
1 files changed, 2 insertions, 0 deletions
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 *); |