projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e492e7b
)
bcachefs: Fix for getting stuck in journal replay
author
Kent Overstreet
<kent.overstreet@gmail.com>
Tue, 12 Apr 2022 05:31:33 +0000
(
01:31
-0400)
committer
Kent Overstreet
<kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:31 +0000
(17:09 -0400)
In journal replay, we weren't immediately dropping journal pins when we
start doing updates that ewern't from journal replay - leading to
journal reclaim getting stuck.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
fs/bcachefs/recovery.c
patch
|
blob
|
history
diff --git
a/fs/bcachefs/recovery.c
b/fs/bcachefs/recovery.c
index 16ba5d24a86ded335168cd3b4e83b9506fa95a20..dc11eae1bcaa901de30f9b2f4dd3a4d16df52b42 100644
(file)
--- a/
fs/bcachefs/recovery.c
+++ b/
fs/bcachefs/recovery.c
@@
-556,7
+556,8
@@
static int journal_keys_sort(struct bch_fs *c)
static void replay_now_at(struct journal *j, u64 seq)
{
BUG_ON(seq < j->replay_journal_seq);
- BUG_ON(seq > j->replay_journal_seq_end);
+
+ seq = min(seq, j->replay_journal_seq_end);
while (j->replay_journal_seq < seq)
bch2_journal_pin_put(j, j->replay_journal_seq++);
@@
-629,8
+630,7
@@
static int bch2_journal_replay(struct bch_fs *c)
cond_resched();
- if (!k->allocated)
- replay_now_at(j, keys->journal_seq_base + k->journal_seq);
+ replay_now_at(j, keys->journal_seq_base + k->journal_seq);
ret = bch2_trans_do(c, NULL, NULL,
BTREE_INSERT_LAZY_RW|