Commit e35fddb
committed
scst_cmd_set_sn: remove lockless fast path
The lockless fast path for scst_cmd_set_sn() can cause commands to
lockup in state EXEC_CHECK_SN when there are multiple scst_tgts
accessing the same scst_device, for example two initiators
connected to the two ports of a dual-port QLogic FC HBA in target mode
both reading from the same shared disk. The multithreaded_init_done
value is too low-level for this; it does not take the higher-level
configuration into account.
- Remove the lockless fast path.
- Remove multithreaded_init_done, which enabled/disabled the lockless
fast path.
- Push the locking down into scst_cmd_set_sn(), which will now apply
regardless of set_sn_on_restart_cmd, which matters for mixed-driver
(e.g. iSCSI+qla2xxx) target-mode setups.
- Remove a bunch of comments explaining the rules for the lockless fast
path.
Fixes: #333
Signed-off-by: Tony Battersby <tonyb@cybernetics.com>1 parent cb6cdf3 commit e35fddb
3 files changed
Lines changed: 12 additions & 50 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
755 | 755 | | |
756 | 756 | | |
757 | 757 | | |
758 | | - | |
759 | | - | |
760 | | - | |
761 | | - | |
762 | | - | |
763 | | - | |
764 | 758 | | |
765 | 759 | | |
766 | 760 | | |
| |||
2033 | 2027 | | |
2034 | 2028 | | |
2035 | 2029 | | |
2036 | | - | |
2037 | | - | |
2038 | | - | |
2039 | | - | |
| 2030 | + | |
2040 | 2031 | | |
2041 | 2032 | | |
2042 | 2033 | | |
| |||
3590 | 3581 | | |
3591 | 3582 | | |
3592 | 3583 | | |
3593 | | - | |
3594 | | - | |
3595 | 3584 | | |
3596 | 3585 | | |
3597 | 3586 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
783 | 783 | | |
784 | 784 | | |
785 | 785 | | |
786 | | - | |
787 | | - | |
788 | | - | |
789 | | - | |
790 | | - | |
791 | | - | |
792 | | - | |
793 | | - | |
794 | | - | |
795 | | - | |
796 | | - | |
797 | | - | |
798 | | - | |
799 | | - | |
800 | 786 | | |
801 | 787 | | |
802 | 788 | | |
| |||
1618 | 1604 | | |
1619 | 1605 | | |
1620 | 1606 | | |
1621 | | - | |
1622 | | - | |
1623 | | - | |
1624 | 1607 | | |
1625 | 1608 | | |
1626 | 1609 | | |
| |||
1652 | 1635 | | |
1653 | 1636 | | |
1654 | 1637 | | |
1655 | | - | |
1656 | | - | |
| 1638 | + | |
1657 | 1639 | | |
1658 | | - | |
1659 | 1640 | | |
1660 | 1641 | | |
1661 | 1642 | | |
| |||
3848 | 3829 | | |
3849 | 3830 | | |
3850 | 3831 | | |
3851 | | - | |
| 3832 | + | |
3852 | 3833 | | |
3853 | 3834 | | |
3854 | 3835 | | |
| |||
3870 | 3851 | | |
3871 | 3852 | | |
3872 | 3853 | | |
| 3854 | + | |
| 3855 | + | |
3873 | 3856 | | |
3874 | 3857 | | |
3875 | 3858 | | |
| |||
3927 | 3910 | | |
3928 | 3911 | | |
3929 | 3912 | | |
3930 | | - | |
| 3913 | + | |
3931 | 3914 | | |
3932 | 3915 | | |
3933 | 3916 | | |
| |||
3948 | 3931 | | |
3949 | 3932 | | |
3950 | 3933 | | |
3951 | | - | |
| 3934 | + | |
3952 | 3935 | | |
3953 | 3936 | | |
3954 | 3937 | | |
| |||
3957 | 3940 | | |
3958 | 3941 | | |
3959 | 3942 | | |
3960 | | - | |
| 3943 | + | |
3961 | 3944 | | |
3962 | | - | |
| 3945 | + | |
3963 | 3946 | | |
3964 | 3947 | | |
3965 | 3948 | | |
| |||
3977 | 3960 | | |
3978 | 3961 | | |
3979 | 3962 | | |
| 3963 | + | |
3980 | 3964 | | |
3981 | 3965 | | |
3982 | 3966 | | |
| |||
4226 | 4210 | | |
4227 | 4211 | | |
4228 | 4212 | | |
4229 | | - | |
4230 | | - | |
4231 | | - | |
4232 | | - | |
4233 | | - | |
4234 | | - | |
4235 | | - | |
4236 | | - | |
4237 | | - | |
4238 | | - | |
4239 | | - | |
4240 | | - | |
| 4213 | + | |
| 4214 | + | |
4241 | 4215 | | |
4242 | 4216 | | |
4243 | 4217 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1352 | 1352 | | |
1353 | 1353 | | |
1354 | 1354 | | |
1355 | | - | |
1356 | 1355 | | |
1357 | 1356 | | |
1358 | 1357 | | |
| |||
0 commit comments