mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-16 10:17:32 +00:00
bcachefs: When traversing to interior nodes, propagate result to paths to same leaf node
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
4dcd90b6d1
commit
be31bf439c
@ -1162,6 +1162,7 @@ int bch2_btree_path_traverse_one(struct btree_trans *trans,
|
||||
goto out_uptodate;
|
||||
|
||||
path->level = btree_path_up_until_good_node(trans, path, 0);
|
||||
unsigned max_level = path->level;
|
||||
|
||||
EBUG_ON(btree_path_node(path, path->level) &&
|
||||
!btree_node_locked(path, path->level));
|
||||
@ -1192,6 +1193,16 @@ int bch2_btree_path_traverse_one(struct btree_trans *trans,
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
if (unlikely(max_level > path->level)) {
|
||||
struct btree_path *linked;
|
||||
unsigned iter;
|
||||
|
||||
trans_for_each_path_with_node(trans, path_l(path)->b, linked, iter)
|
||||
for (unsigned j = path->level + 1; j < max_level; j++)
|
||||
linked->l[j] = path->l[j];
|
||||
}
|
||||
|
||||
out_uptodate:
|
||||
path->uptodate = BTREE_ITER_UPTODATE;
|
||||
out:
|
||||
|
Loading…
x
Reference in New Issue
Block a user