aboutsummaryrefslogtreecommitdiff
path: root/fs/bcachefs/recovery.c
diff options
context:
space:
mode:
authorGravatar Kent Overstreet <kent.overstreet@linux.dev> 2023-11-08 22:00:00 -0500
committerGravatar Kent Overstreet <kent.overstreet@linux.dev> 2024-01-01 11:47:37 -0500
commit9a71de675f97acafdcda7bf4ce4ba10247c1db00 (patch)
tree49037721d00519f40d01e744bcea822bb40edc31 /fs/bcachefs/recovery.c
parentbcachefs: Clear k->needs_whitout earlier in commit path (diff)
downloadlinux-9a71de675f97acafdcda7bf4ce4ba10247c1db00.tar.gz
linux-9a71de675f97acafdcda7bf4ce4ba10247c1db00.tar.bz2
linux-9a71de675f97acafdcda7bf4ce4ba10247c1db00.zip
bcachefs: BTREE_INSERT_JOURNAL_REPLAY now "don't init trans->journal_res"
This slightly changes how trans->journal_res works, in preparation for changing the btree write buffer flush path to use it. Now, BTREE_INSERT_JOURNAL_REPLAY means "don't take a journal reservation; trans->journal_res.seq already refers to the journal sequence number to pin". Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/recovery.c')
-rw-r--r--fs/bcachefs/recovery.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/bcachefs/recovery.c b/fs/bcachefs/recovery.c
index 7b625fa37d92..d56c28b4c8d4 100644
--- a/fs/bcachefs/recovery.c
+++ b/fs/bcachefs/recovery.c
@@ -99,6 +99,8 @@ static int bch2_journal_replay_key(struct btree_trans *trans,
unsigned update_flags = BTREE_TRIGGER_NORUN;
int ret;
+ trans->journal_res.seq = k->journal_seq;
+
/*
* BTREE_UPDATE_KEY_CACHE_RECLAIM disables key cache lookup/update to
* keep the key cache coherent with the underlying btree. Nothing