From: "Nicholas A. Bellinger" <nab@daterainc.com>
To: target-devel <target-devel@vger.kernel.org>
Cc: linux-scsi <linux-scsi@vger.kernel.org>,
Quinn Tran <quinn.tran@qlogic.com>,
Himanshu Madhani <himanshu.madhani@qlogic.com>,
Sagi Grimberg <sagig@mellanox.com>,
Christoph Hellwig <hch@lst.de>, Hannes Reinecke <hare@suse.de>,
Andy Grover <agrover@redhat.com>,
Mike Christie <mchristi@redhat.com>,
Nicholas Bellinger <nab@linux-iscsi.org>
Subject: [PATCH-v4 0/5] Fix LUN_RESET active I/O + TMR handling
Date: Sun, 7 Feb 2016 03:17:57 +0000 [thread overview]
Message-ID: <1454815082-15380-1-git-send-email-nab@daterainc.com> (raw)
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
next reply other threads:[~2016-02-07 3:21 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-07 3:17 Nicholas A. Bellinger [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1454815082-15380-1-git-send-email-nab@daterainc.com \
--to=nab@daterainc.com \
--cc=agrover@redhat.com \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=himanshu.madhani@qlogic.com \
--cc=linux-scsi@vger.kernel.org \
--cc=mchristi@redhat.com \
--cc=nab@linux-iscsi.org \
--cc=quinn.tran@qlogic.com \
--cc=sagig@mellanox.com \
--cc=target-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).