Skip to content
Commit 1aaf5cb4 authored by Kent Overstreet's avatar Kent Overstreet
Browse files

bcachefs: Fix btree_trans list ordering



The debug code relies on btree_trans_list being ordered so that it can
resume on subsequent calls or lock restarts.

However, it was using trans->locknig_wait.task.pid, which is incorrect
since btree_trans objects are cached and reused - typically by different
tasks.

Fix this by switching to pointer order, and also sort them lazily when
required - speeding up the btree_trans_get() fastpath.

Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent de611ab6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment