aboutsummaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/btree_trans_commit.c
diff options
context:
space:
mode:
authorKent Overstreet <[email protected]>2024-10-31 07:35:41 +0000
committerKent Overstreet <[email protected]>2024-12-21 06:36:16 +0000
commitcc944fbe06d8e7b1098d42b9b824272dad5cea44 (patch)
tree6dea5cb0b1eadf6450272ec39336da2ca842392b /fs/bcachefs/btree_trans_commit.c
parentbcachefs: use attribute define helper for sysfs attribute (diff)
downloadkernel-cc944fbe06d8e7b1098d42b9b824272dad5cea44.tar.gz
kernel-cc944fbe06d8e7b1098d42b9b824272dad5cea44.zip
bcachefs: Add assert for use of journal replay keys for updates
The journal replay keys mechanism can only be used for updates in early recovery, when still single threaded. Add some asserts to make sure we never accidentally use it elsewhere. Signed-off-by: Kent Overstreet <[email protected]>
Diffstat (limited to 'fs/bcachefs/btree_trans_commit.c')
-rw-r--r--fs/bcachefs/btree_trans_commit.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/bcachefs/btree_trans_commit.c b/fs/bcachefs/btree_trans_commit.c
index b47f11881fe4..529a5a19ab8a 100644
--- a/fs/bcachefs/btree_trans_commit.c
+++ b/fs/bcachefs/btree_trans_commit.c
@@ -999,6 +999,8 @@ do_bch2_trans_commit_to_journal_replay(struct btree_trans *trans)
{
struct bch_fs *c = trans->c;
+ BUG_ON(current != c->recovery_task);
+
trans_for_each_update(trans, i) {
int ret = bch2_journal_key_insert(c, i->btree_id, i->level, i->k);
if (ret)