linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH-v4 0/5] Fix LUN_RESET active I/O + TMR handling
@ 2016-02-07  3:17 Nicholas A. Bellinger
  2016-02-07  3:17 ` [PATCH-v4 1/5] target: Fix LUN_RESET active I/O handling for ACK_KREF Nicholas A. Bellinger
                   ` (6 more replies)
  0 siblings, 7 replies; 20+ messages in thread
From: Nicholas A. Bellinger @ 2016-02-07  3:17 UTC (permalink / raw)
  To: target-devel
  Cc: linux-scsi, Quinn Tran, Himanshu Madhani, Sagi Grimberg,
	Christoph Hellwig, Hannes Reinecke, Andy Grover, Mike Christie,
	Nicholas Bellinger

From: Nicholas Bellinger <nab@linux-iscsi.org>

Hi folks,

Here is -v4 series to address the set of of LUN_RESET
active I/O + TMR se_cmd->cmd_kref < 0 bugs as reported
recently by Quinn & Co.  This can occur during active
I/O remote port TMR LUN_RESET with multi-port LIO
configurations.

To address this bug, we add a __target_check_io_state()
common handler for ABORT_TASK + LUN_RESET I/O abort
cases, and move the remaining se_cmd SGL page + release
into target_free_cmd_mem() to now be called directly
from final target_release_cmd_kref() callback.

It also adds a target_wait_free_cmd() helper and makes
transport_generic_free_cmd() aware of CMD_T_ABORTED
status during concurrent session disconnects, and
introduces CMD_T_FABRIC_STOP bit to signal this special
case.

Currently this series is running atop v4.5-rc1 + v3.14.y,
and with iscsi-target ports is able to survive active
I/O remote-port LUN resets, plus remote-port LUN_RESET
with concurrent simulated session disconnects.

At this point the changes are stable with iscsi-target
ports, and as Himanshu + Co can verify with tcm_qla2xxx
should be considered ready to merge for -rc4.

Please review + test.

--nab

v4 changes:

- Add explicit CMD_T_FABRIC_STOP check and drop cmd_wait_set
  bit set usage in __target_check_io_state().
- Set early CMD_T_TAS in __target_check_io_state to avoid
  potential race in transport_send_task_abort() with shutdown.
- Add fabric_stop + aborted checks in __transport_wait_for_tasks()
  in order to let TMR CMD_T_ABORTED se_cmd shutdown complete
  during concurrent session disconnect.
- Fix race with driver SCF_SEND_DELAYED_TAS handling when
  __transport_check_aborted_status() could happen before
  transport_send_task_abort() in TMR kthread context.

Nicholas Bellinger (5):
  target: Fix LUN_RESET active I/O handling for ACK_KREF
  target: Fix LUN_RESET active TMR descriptor handling
  target: Fix TAS handling for multi-session se_node_acls
  target: Fix remote-port TMR ABORT + se_cmd fabric stop
  target: Fix race with SCF_SEND_DELAYED_TAS handling

 drivers/target/target_core_tmr.c       | 139 ++++++++++++-----
 drivers/target/target_core_transport.c | 278 +++++++++++++++++++++++----------
 include/target/target_core_base.h      |   3 +
 3 files changed, 301 insertions(+), 119 deletions(-)

-- 
1.9.1


^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2016-02-27  2:43 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-07  3:17 [PATCH-v4 0/5] Fix LUN_RESET active I/O + TMR handling Nicholas A. Bellinger
2016-02-07  3:17 ` [PATCH-v4 1/5] target: Fix LUN_RESET active I/O handling for ACK_KREF Nicholas A. Bellinger
2016-02-07  3:17 ` [PATCH-v4 2/5] target: Fix LUN_RESET active TMR descriptor handling Nicholas A. Bellinger
2016-02-07  3:18 ` [PATCH-v4 3/5] target: Fix TAS handling for multi-session se_node_acls Nicholas A. Bellinger
2016-02-07  3:18 ` [PATCH-v4 4/5] target: Fix remote-port TMR ABORT + se_cmd fabric stop Nicholas A. Bellinger
2016-02-07  3:18 ` [PATCH-v4 5/5] target: Fix race with SCF_SEND_DELAYED_TAS handling Nicholas A. Bellinger
2016-02-07  4:19 ` [PATCH-v4 0/5] Fix LUN_RESET active I/O + TMR handling Bart Van Assche
2016-02-07  5:19   ` Nicholas A. Bellinger
2016-02-07 16:02     ` Bart Van Assche
2016-02-07 19:24       ` Nicholas A. Bellinger
2016-02-08 23:27 ` Himanshu Madhani
2016-02-09  5:25   ` Nicholas A. Bellinger
2016-02-09 18:03     ` Himanshu Madhani
2016-02-11  6:53       ` Nicholas A. Bellinger
2016-02-11 23:47         ` Nicholas A. Bellinger
2016-02-12  5:30           ` Himanshu Madhani
2016-02-12  8:48             ` Nicholas A. Bellinger
2016-02-13  7:03               ` Nicholas A. Bellinger
2016-02-15 19:02                 ` Himanshu Madhani
2016-02-27  2:43             ` Dan Lane

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).