Commit 1aaf5cb
Kent Overstreet
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: Kent Overstreet <[email protected]>1 parent de611ab commit 1aaf5cb
2 files changed
+34
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3149 | 3149 | | |
3150 | 3150 | | |
3151 | 3151 | | |
3152 | | - | |
3153 | | - | |
3154 | | - | |
3155 | | - | |
3156 | | - | |
3157 | 3152 | | |
3158 | 3153 | | |
3159 | | - | |
3160 | | - | |
| 3154 | + | |
| 3155 | + | |
3161 | 3156 | | |
3162 | 3157 | | |
3163 | 3158 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
568 | 568 | | |
569 | 569 | | |
570 | 570 | | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
571 | 597 | | |
572 | 598 | | |
573 | 599 | | |
| |||
581 | 607 | | |
582 | 608 | | |
583 | 609 | | |
584 | | - | |
585 | | - | |
| 610 | + | |
586 | 611 | | |
587 | | - | |
| 612 | + | |
| 613 | + | |
588 | 614 | | |
589 | 615 | | |
| 616 | + | |
| 617 | + | |
590 | 618 | | |
591 | 619 | | |
592 | 620 | | |
| |||
596 | 624 | | |
597 | 625 | | |
598 | 626 | | |
599 | | - | |
| 627 | + | |
600 | 628 | | |
601 | 629 | | |
602 | 630 | | |
| |||
0 commit comments