projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cd7c2d3
)
bcachefs: Tweak journal reclaim order
author
Kent Overstreet
<kent.overstreet@gmail.com>
Sun, 2 Jan 2022 01:45:30 +0000
(20:45 -0500)
committer
Kent Overstreet
<kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:21 +0000
(17:09 -0400)
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
39b5b97
..
2193516
100644
(file)
--- a/
fs/bcachefs/recovery.c
+++ b/
fs/bcachefs/recovery.c
@@
-116,12
+116,19
@@
int bch2_journal_key_insert_take(struct bch_fs *c, enum btree_id id,
.btree_id = id,
.level = level,
.k = k,
- .allocated = true
+ .allocated = true,
+ /*
+ * Ensure these keys are done last by journal replay, to unblock
+ * journal reclaim:
+ */
+ .journal_seq = U32_MAX,
};
struct journal_keys *keys = &c->journal_keys;
struct journal_iter *iter;
unsigned idx = journal_key_search(keys, id, level, k->k.p);
+ BUG_ON(test_bit(BCH_FS_RW, &c->flags));
+
if (idx < keys->nr &&
journal_key_cmp(&n, &keys->d[idx]) == 0) {
if (keys->d[idx].allocated)