bcachefs: Mark newly allocated btree nodes as accessed
This was a major oversight - this means under memory pressure we can end up reading in a btree node, then having it evicted before we get to use it. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
595c1e9bab
commit
e68031fb46
@ -590,6 +590,7 @@ out:
|
||||
b->sib_u64s[1] = 0;
|
||||
b->whiteout_u64s = 0;
|
||||
bch2_btree_keys_init(b);
|
||||
set_btree_node_accessed(b);
|
||||
|
||||
bch2_time_stats_update(&c->times[BCH_TIME_btree_node_mem_alloc],
|
||||
start_time);
|
||||
|
Loading…
x
Reference in New Issue
Block a user