Hello Nic, Several additional patches have been added to this series after a stress test with the iSCSI, ib_srpt and tcm_qla2xxx drivers. The iSCSI target driver should work at least as reliable as the current upstream code. The ib_srpt driver now passes my fio --verify concurrently with sg_reset -d stress test which is not the case for the upstream code. Abort handling in the tcm_qla2xxx driver is not yet perfect but has been improved significantly over the behavior of the upstream code. Please review the patches in this patch series. Thanks, Bart. Changes between v5 and v6: - Added several more patches that address the issues discovered during various stress tests. - Switched from tmr_wq to the system workqueues for processing TMFs. - Restored the patch that renames tmr_wq into alua_wq. - Restored the transport_lookup_tmr_lun() call in patch "Make it possible to specify I_T nexus for SCSI abort". - Reordered the patches in this series. - Multiple additional small changes. Changes between v4 and v5: - Rebased this patch series on top of the for-next branch of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git (commit b2c9652eba6c). - Left out the transport_lookup_tmr_lun() call from core_tmr_abort_task() in patch "Make it possible to specify I_T nexus for SCSI abort". - Left out the transport_cmd_check_stop() return value changes from patch "Introduce a target driver reference count per command". - Introduced a new patch "Make transport_wait_for_tasks() show what it is waiting for". - Improved handling of aborted TMFs in patch "Make ABORT and LUN RESET handling synchronous". - Folded patch "Simplify session shutdown tests" into patch "Simplify session shutdown code". - Restored the FABRIC_STOP tests in patch "Remove several state tests from the TMF code". Changes between v3 and v4: - The TMF workqueue initialization code has been moved from transport_alloc_session_tags() into transport_init_session() such that this queue is created for all types of sessions. - The transport_wait_for_tasks() documentation no longer duplicates information that can be derived easily from the implementation of that function. - Explained how the newly added return statement can be triggered in the description of patch "target: Stop execution if CMD_T_STOP has been set". - Combined two patches into the new patch "target: Use the command reference counting mechanism consistently". - Added a new patch "target: Move session check from target_put_sess_cmd() into target_release_cmd_kref()". - Separated the target core refcnt from the target driver refcnt. See also "target: Introduce a target driver reference count per command". - Dropped a TMF check from the patch that makes TMF handling synchronous. In the same patch a facility for showing the state of pending commands has been added and a command reference leak has been fixed in target_execute_cmd() (see also the transport_handle_abort() call added in that function). - A new patch has been added: "target: Simplify session shutdown tests". - transport_generic_free_cmd() has been modified such that it waits again for aborted commands until all tasks have completed. - A bug in the XCOPY deadlock fix has been fixed, namely that that code no longer tries to increase the reference count of a device if that reference count had dropped to zero. Changes between v2 and v3: - Avoid that transport_free_session() can trigger a NULL pointer dereference. Changes between v1 and v2: - Introduced a new workqueue per session for task management functions. - Renamed tmr_wq into alua_wq. Bart Van Assche (33): tcm_qla2xxx: Simplify qlt_create_sess() tcm_qla2xxx: Simplify tcm_qla2xxx_aborted_task() tcm_qla2xxx: Rework abort handling tcm_qla2xxx: Move the code for freeing a TMF into tcm_qla2xxx.c tcm_qla2xxx: Fix reference leaks related to aborting commands target: Fix handling of aborted failed commands target: Use system workqueues for TMF target: Rename tmr_wq into alua_wq target: Make it possible to specify I_T nexus for SCSI abort tcm_qla2xxx: Let the target core look up the LUN of the aborted cmd configfs: Introduce config_item_get_unless_zero() target: Introduce target_get_device() and target_put_device() target: Avoid that XCOPY commands trigger a deadlock target: Avoid that target drivers hang if a command is aborted target: Avoid circular waits between LUN resets target: Introduce a target driver reference count per command target: Use the command reference counting mechanism consistently target: Introduce a function that shows the command state target: Avoid that LUN reset sporadically triggers data corruption target: Make ABORT and LUN RESET handling synchronous target: Remove the SCF_SEND_DELAYED_TAS command flag target: Inline transport_check_aborted_status() target: Remove the write_pending_status() callback function target: Simplify session shutdown code target: Remove several state tests from the TMF code target: Simplify LUN RESET implementation target: Reduce number of __transport_wait_for_tasks() arguments target: Remove command flag CMD_T_TAS target: Remove unused arguments from __target_check_io_state() target: Change return type of transport_wait_for_tasks() into void target: Inline transport_put_cmd() target: Inline transport_lun_remove_cmd() target: Move target_remove_from_state_list() into target_release_cmd_kref() Documentation/target/tcm_mod_builder.py | 8 - drivers/infiniband/ulp/srpt/ib_srpt.c | 13 +- drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 6 - drivers/scsi/qla2xxx/qla_target.c | 151 ++----- drivers/scsi/qla2xxx/qla_target.h | 4 +- drivers/scsi/qla2xxx/tcm_qla2xxx.c | 114 ++--- drivers/target/iscsi/iscsi_target.c | 7 +- drivers/target/iscsi/iscsi_target_configfs.c | 13 - drivers/target/iscsi/iscsi_target_erl1.c | 8 +- drivers/target/loopback/tcm_loop.c | 6 - drivers/target/sbp/sbp_target.c | 6 - drivers/target/target_core_alua.c | 4 +- drivers/target/target_core_configfs.c | 4 - drivers/target/target_core_device.c | 24 +- drivers/target/target_core_internal.h | 6 +- drivers/target/target_core_tmr.c | 158 +++---- drivers/target/target_core_transport.c | 614 ++++++++++++--------------- drivers/target/target_core_xcopy.c | 49 +-- drivers/target/tcm_fc/tcm_fc.h | 1 - drivers/target/tcm_fc/tfc_cmd.c | 7 - drivers/target/tcm_fc/tfc_conf.c | 1 - drivers/usb/gadget/function/f_tcm.c | 9 - drivers/vhost/scsi.c | 6 - drivers/xen/xen-scsiback.c | 6 - fs/configfs/item.c | 6 + include/linux/configfs.h | 1 + include/target/target_core_base.h | 12 +- include/target/target_core_fabric.h | 4 +- 28 files changed, 462 insertions(+), 786 deletions(-) -- 2.11.0 -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html