mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 16:44:58 +02:00
bcachefs: Tweak journal reclaim order
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
This commit is contained in:
parent
cd7c2d3d8d
commit
f28620c108
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user