aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/target/target_core_tmr.c
diff options
context:
space:
mode:
authorBart Van Assche <bvanassche@acm.org>2019-01-25 10:34:44 -0800
committerMartin K. Petersen <martin.petersen@oracle.com>2019-02-04 21:25:13 -0500
commit3f0661a492a199b7de2fb63eceba8c79039bff83 (patch)
tree72f17cb0976dd048ec122c786b65e0682cd2ffc1 /drivers/target/target_core_tmr.c
parentscsi: target/core: Remove the write_pending_status() callback function (diff)
downloadlinux-dev-3f0661a492a199b7de2fb63eceba8c79039bff83.tar.xz
linux-dev-3f0661a492a199b7de2fb63eceba8c79039bff83.zip
scsi: target/core: Remove several state tests from the TMF code
Whether or not a session is being torn down does not affect whether or not SCSI commands are in the task set. Hence remove the "tearing down" checks from the TMF code. The TRANSPORT_ISTATE_PROCESSING check is left out because it is now safe to wait for a command that is in that state. The CMD_T_PRE_EXECUTE is left out because abort processing is postponed until after commands have left the pre-execute state since the patch that makes TMF processing synchronous. See also commit 1c21a48055a6 ("target: Avoid early CMD_T_PRE_EXECUTE failures during ABORT_TASK"). Cc: Nicholas Bellinger <nab@linux-iscsi.org> Cc: Mike Christie <mchristi@redhat.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Hannes Reinecke <hare@suse.de> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/target/target_core_tmr.c')
-rw-r--r--drivers/target/target_core_tmr.c25
1 files changed, 0 insertions, 25 deletions
diff --git a/drivers/target/target_core_tmr.c b/drivers/target/target_core_tmr.c
index ad0061e09d4c..df1ca827de68 100644
--- a/drivers/target/target_core_tmr.c
+++ b/drivers/target/target_core_tmr.c
@@ -114,21 +114,6 @@ static bool __target_check_io_state(struct se_cmd *se_cmd,
spin_unlock(&se_cmd->t_state_lock);
return false;
}
- if (se_cmd->transport_state & CMD_T_PRE_EXECUTE) {
- if (se_cmd->scsi_status) {
- pr_debug("Attempted to abort io tag: %llu early failure"
- " status: 0x%02x\n", se_cmd->tag,
- se_cmd->scsi_status);
- spin_unlock(&se_cmd->t_state_lock);
- return false;
- }
- }
- if (sess->sess_tearing_down) {
- pr_debug("Attempted to abort io tag: %llu already shutdown,"
- " skipping\n", se_cmd->tag);
- spin_unlock(&se_cmd->t_state_lock);
- return false;
- }
se_cmd->transport_state |= CMD_T_ABORTED;
if ((tmr_sess != se_cmd->se_sess) && tas)
@@ -239,16 +224,6 @@ static void core_tmr_drain_tmr_list(
spin_unlock(&sess->sess_cmd_lock);
continue;
}
- if (cmd->t_state == TRANSPORT_ISTATE_PROCESSING) {
- spin_unlock(&cmd->t_state_lock);
- spin_unlock(&sess->sess_cmd_lock);
- continue;
- }
- if (sess->sess_tearing_down) {
- spin_unlock(&cmd->t_state_lock);
- spin_unlock(&sess->sess_cmd_lock);
- continue;
- }
cmd->transport_state |= CMD_T_ABORTED;
spin_unlock(&cmd->t_state_lock);