kernel_optimize_test/include/target
Nicholas Bellinger 9b31a328e3 target: Re-instate sess_wait_list for target_wait_for_sess_cmds
Switch back to pre commit 1c7b13fe65 list splicing logic for active I/O
shutdown with tcm_qla2xxx + ib_srpt fabrics.

The original commit was done under the incorrect assumption that it's safe to
walk se_sess->sess_cmd_list unprotected in target_wait_for_sess_cmds() after
sess->sess_tearing_down = 1 has been set by target_sess_cmd_list_set_waiting()
during session shutdown.

So instead of adding sess->sess_cmd_lock protection around sess->sess_cmd_list
during target_wait_for_sess_cmds(), switch back to sess->sess_wait_list to
allow wait_for_completion() + TFO->release_cmd() to occur without having to
walk ->sess_cmd_list after the list_splice.

Also add a check to exit if target_sess_cmd_list_set_waiting() has already
been called, and add a WARN_ON to check for any fabric bug where new se_cmds
are added to sess->sess_cmd_list after sess->sess_tearing_down = 1 has already
been set.

Cc: Joern Engel <joern@logfs.org>
Cc: Roland Dreier <roland@kernel.org>
Cc: stable@vger.kernel.org
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
2013-05-29 21:30:33 -07:00
..
iscsi iscsi-target: Add iscsit_transport API template 2013-04-25 01:05:26 -07:00
configfs_macros.h doc: fix broken references 2011-09-27 18:08:04 +02:00
target_core_backend.h target: Add sbc_execute_unmap() helper 2013-04-25 01:05:24 -07:00
target_core_base.h target: Re-instate sess_wait_list for target_wait_for_sess_cmds 2013-05-29 21:30:33 -07:00
target_core_configfs.h
target_core_fabric_configfs.h
target_core_fabric.h target: Remove unused wait_for_tasks bit in target_wait_for_sess_cmds 2013-05-20 21:44:10 -07:00