Commit b711ef5
scsi: hisi_sas: Sync complete queue for poll queue
Currently we sync irq to avoid freeing task before using task in I/O
completion. After adding io_uring support, we need to do something similar
for poll queues. As the process of CQ entries on poll queue are protected
by spinlock cq->lock, we can use spin_lock() + spin_unlock() on cq->lock to
make sure that CQ entries are processed to completion and then the complete
queue is synced.
Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com>
Link: https://lore.kernel.org/r/1678169355-76215-4-git-send-email-chenxiang66@hisilicon.com
Reviewed-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>1 parent 0e47eff commit b711ef5
3 files changed
Lines changed: 61 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
660 | 660 | | |
661 | 661 | | |
662 | 662 | | |
663 | | - | |
664 | 663 | | |
665 | 664 | | |
666 | 665 | | |
667 | 666 | | |
668 | 667 | | |
| 668 | + | |
| 669 | + | |
669 | 670 | | |
670 | 671 | | |
671 | 672 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
683 | 683 | | |
684 | 684 | | |
685 | 685 | | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
686 | 735 | | |
687 | 736 | | |
688 | 737 | | |
| |||
694 | 743 | | |
695 | 744 | | |
696 | 745 | | |
697 | | - | |
| 746 | + | |
698 | 747 | | |
699 | 748 | | |
700 | | - | |
| 749 | + | |
701 | 750 | | |
702 | 751 | | |
703 | 752 | | |
| |||
1551 | 1600 | | |
1552 | 1601 | | |
1553 | 1602 | | |
1554 | | - | |
| 1603 | + | |
1555 | 1604 | | |
1556 | 1605 | | |
1557 | 1606 | | |
1558 | | - | |
| 1607 | + | |
1559 | 1608 | | |
1560 | 1609 | | |
1561 | 1610 | | |
| |||
1622 | 1671 | | |
1623 | 1672 | | |
1624 | 1673 | | |
1625 | | - | |
| 1674 | + | |
1626 | 1675 | | |
1627 | 1676 | | |
1628 | | - | |
| 1677 | + | |
1629 | 1678 | | |
1630 | 1679 | | |
1631 | 1680 | | |
| |||
1896 | 1945 | | |
1897 | 1946 | | |
1898 | 1947 | | |
1899 | | - | |
| 1948 | + | |
1900 | 1949 | | |
1901 | 1950 | | |
1902 | | - | |
| 1951 | + | |
1903 | 1952 | | |
1904 | 1953 | | |
1905 | 1954 | | |
| |||
2003 | 2052 | | |
2004 | 2053 | | |
2005 | 2054 | | |
2006 | | - | |
2007 | | - | |
2008 | | - | |
2009 | | - | |
2010 | | - | |
2011 | | - | |
2012 | | - | |
2013 | | - | |
2014 | | - | |
2015 | | - | |
2016 | | - | |
2017 | | - | |
2018 | 2055 | | |
2019 | 2056 | | |
2020 | 2057 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2657 | 2657 | | |
2658 | 2658 | | |
2659 | 2659 | | |
| 2660 | + | |
2660 | 2661 | | |
2661 | 2662 | | |
2662 | 2663 | | |
| |||
3069 | 3070 | | |
3070 | 3071 | | |
3071 | 3072 | | |
3072 | | - | |
| 3073 | + | |
3073 | 3074 | | |
3074 | 3075 | | |
3075 | 3076 | | |
| |||
0 commit comments