From: <vl...@us...> - 2007-04-02 10:57:40
|
Revision: 103 http://svn.sourceforge.net/scst/?rev=103&view=rev Author: vlnb Date: 2007-04-02 03:55:55 -0700 (Mon, 02 Apr 2007) Log Message: ----------- Minor fixes Modified Paths: -------------- trunk/qla2x00t/qla2x00-target/qla2x00t.c trunk/scst/src/dev_handlers/scst_vdisk.c Modified: trunk/qla2x00t/qla2x00-target/qla2x00t.c =================================================================== --- trunk/qla2x00t/qla2x00-target/qla2x00t.c 2007-03-07 17:10:45 UTC (rev 102) +++ trunk/qla2x00t/qla2x00-target/qla2x00t.c 2007-04-02 10:55:55 UTC (rev 103) @@ -975,6 +975,7 @@ struct scst_cmd *scst_cmd; struct q2t_cmd *cmd; uint16_t loop_id = -1; + int err = 0; TRACE_ENTRY(); @@ -994,23 +995,24 @@ case CTIO_ABORTED: case CTIO_TIMEOUT: case CTIO_INVALID_RX_ID: + err = 1; /* they are OK */ -#if defined(DEBUG) || defined(TRACING) - PRINT_INFO("qla2x00tgt(%ld): CTIO with status %#x " + TRACE_MGMT_DBG("qla2x00tgt(%ld): CTIO with status %#x " "received (LIP_RESET=e, ABORTED=2, " "TARGET_RESET=17, TIMEOUT=b, " "INVALID_RX_ID=8)", ha->instance, status); -#endif break; case CTIO_PORT_LOGGED_OUT: case CTIO_PORT_UNAVAILABLE: + err = 1; PRINT_INFO("qla2x00tgt(%ld): CTIO with PORT LOGGED " "OUT (29) or PORT UNAVAILABLE (28) status %x " "received", ha->instance, status); break; default: + err = 1; PRINT_ERROR("qla2x00tgt(%ld): CTIO with error status " "0x%x received", ha->instance, status); break; @@ -1032,6 +1034,10 @@ ha->instance, handle); goto out; } + if (unlikely(err)) { + PRINT_INFO("Found by handle failed CTIO scst_cmd " + "%p (op %x)", scst_cmd, scst_cmd->cdb[0]); + } } else if (ctio != NULL) { uint32_t tag = le16_to_cpu(ctio->exchange_id); struct q2t_sess *sess = q2t_find_sess_by_lid(ha->tgt, loop_id); @@ -1051,12 +1057,19 @@ ha->instance, tag, loop_id); goto out; } + if (unlikely(err)) { + PRINT_INFO("Found by ctio failed CTIO scst_cmd %p " + "(op %x)", scst_cmd, scst_cmd->cdb[0]); + } TRACE_DBG("Found scst_cmd %p", scst_cmd); } else goto out; cmd = (struct q2t_cmd *)scst_cmd_get_tgt_priv(scst_cmd); + if (unlikely(err)) { + PRINT_INFO("Failed CTIO state %d", cmd->state); + } if (cmd->state == Q2T_STATE_PROCESSED) { TRACE_DBG("Command %p finished", cmd); @@ -1103,6 +1116,9 @@ return; out_free: + if (unlikely(err)) { + TRACE_MGMT_DBG("%s", "Finishing failed CTIO"); + } scst_tgt_cmd_done(scst_cmd); goto out; } Modified: trunk/scst/src/dev_handlers/scst_vdisk.c =================================================================== --- trunk/scst/src/dev_handlers/scst_vdisk.c 2007-03-07 17:10:45 UTC (rev 102) +++ trunk/scst/src/dev_handlers/scst_vdisk.c 2007-04-02 10:55:55 UTC (rev 103) @@ -782,6 +782,8 @@ vdisk_exec_read_toc(cmd); break; case START_STOP: + vdisk_fsync(thr, 0, virt_dev->file_size, cmd); + break; case RESERVE: case RESERVE_10: case RELEASE: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |