From: <vl...@us...> - 2007-01-17 14:47:32
|
Revision: 80 http://svn.sourceforge.net/scst/?rev=80&view=rev Author: vlnb Date: 2007-01-17 06:47:21 -0800 (Wed, 17 Jan 2007) Log Message: ----------- Minor TM-related fixes Modified Paths: -------------- trunk/scst/src/scst_lib.c trunk/scst/src/scst_targ.c Modified: trunk/scst/src/scst_lib.c =================================================================== --- trunk/scst/src/scst_lib.c 2007-01-16 17:51:48 UTC (rev 79) +++ trunk/scst/src/scst_lib.c 2007-01-17 14:47:21 UTC (rev 80) @@ -2270,7 +2270,7 @@ static int tm_dbg_on_state_passes; static DEFINE_TIMER(tm_dbg_timer, tm_dbg_timer_fn, 0, 0); -static const int tm_dbg_on_state_num_passes[] = { 10, 1, 0x7ffffff }; +static const int tm_dbg_on_state_num_passes[] = { 5, 1, 0x7ffffff }; void tm_dbg_init_tgt_dev(struct scst_tgt_dev *tgt_dev, struct scst_acg_dev *acg_dev) @@ -2308,16 +2308,20 @@ if (tm_dbg_delayed_cmds_count == 0) { unsigned long d = 58*HZ + (scst_random() % (4*HZ)); TRACE_MGMT_DBG("%s: delaying timed cmd %p (tag %d) " - "for %ld.%ld seconds (%ld HZ)", __func__, cmd, cmd->tag, - d/HZ, (d%HZ)*100/HZ, d); + "for %ld.%ld seconds (%ld HZ), " + "tm_dbg_on_state_passes=%d", __func__, cmd, + cmd->tag, d/HZ, (d%HZ)*100/HZ, d, + tm_dbg_on_state_passes); mod_timer(&tm_dbg_timer, jiffies + d); #if 0 tm_dbg_blocked = 1; #endif } else { TRACE_MGMT_DBG("%s: delaying another timed cmd %p " - "(tag %d), delayed_cmds_count=%d", __func__, cmd, - cmd->tag, tm_dbg_delayed_cmds_count); + "(tag %d), delayed_cmds_count=%d, " + "tm_dbg_on_state_passes=%d", __func__, cmd, + cmd->tag, tm_dbg_delayed_cmds_count, + tm_dbg_on_state_passes); if (tm_dbg_delayed_cmds_count == 2) tm_dbg_blocked = 0; } @@ -2326,8 +2330,10 @@ case TM_DBG_STATE_RESET: case TM_DBG_STATE_OFFLINE: TRACE_MGMT_DBG("%s: delaying cmd %p " - "(tag %d), delayed_cmds_count=%d", __func__, cmd, - cmd->tag, tm_dbg_delayed_cmds_count); + "(tag %d), delayed_cmds_count=%d, " + "tm_dbg_on_state_passes=%d", __func__, cmd, + cmd->tag, tm_dbg_delayed_cmds_count, + tm_dbg_on_state_passes); tm_dbg_blocked = 1; break; Modified: trunk/scst/src/scst_targ.c =================================================================== --- trunk/scst/src/scst_targ.c 2007-01-16 17:51:48 UTC (rev 79) +++ trunk/scst/src/scst_targ.c 2007-01-17 14:47:21 UTC (rev 80) @@ -722,6 +722,8 @@ scst_cmd_set_sn(cmd); spin_unlock_irqrestore(&scst_list_lock, flags); } + if (tm_dbg_check_cmd(cmd) != 0) + goto out; break; case SCST_PREPROCESS_STATUS_ERROR_SENSE_SET: @@ -3403,7 +3405,7 @@ mcmd->state = SCST_MGMT_CMD_STATE_FINISHED; if (scst_is_strict_mgmt_fn(mcmd->fn) && (mcmd->completed_cmd_count > 0)) - mcmd->status = SCST_MGMT_STATUS_FAILED; + mcmd->status = SCST_MGMT_STATUS_TASK_NOT_EXIST; if (mcmd->sess->tgt->tgtt->task_mgmt_fn_done) { TRACE_DBG("Calling target %s task_mgmt_fn_done()", This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |