Minor logging changes
authorvlnb <vlnb@d57e44dd-8a1f-0410-8b47-8ef2f437770f>
Mon, 31 Dec 2007 11:42:23 +0000 (11:42 +0000)
committervlnb <vlnb@d57e44dd-8a1f-0410-8b47-8ef2f437770f>
Mon, 31 Dec 2007 11:42:23 +0000 (11:42 +0000)
git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@241 d57e44dd-8a1f-0410-8b47-8ef2f437770f

iscsi-scst/kernel/conn.c
iscsi-scst/kernel/iscsi.c
scst/src/scst_lib.c
scst/src/scst_targ.c

index 15ad143..1aa206d 100644 (file)
@@ -400,10 +400,11 @@ void iscsi_extracheck_is_rd_thread(struct iscsi_conn *conn)
        if (unlikely(current != conn->rd_task)) {
                while(in_softirq())
                        local_bh_enable();
-               printk(KERN_EMERG "conn %p rd_task != current (%p)", conn, current);
-               printk(KERN_EMERG "rd_task %p", conn->rd_task);
-               printk(KERN_EMERG "current->pid %d, rd_task->pid %d", current->pid,
-                       conn->rd_task->pid);
+               printk(KERN_EMERG "conn %p rd_task != current %p (pid %d)\n", conn,
+                       current, current->pid);
+               printk(KERN_EMERG "wr_state %x\n", conn->rd_state);
+               printk(KERN_EMERG "rd_task %p\n", conn->rd_task);
+               printk(KERN_EMERG "rd_task->pid %d\n", conn->rd_task->pid);
                sBUG();
        }
 }
@@ -413,10 +414,11 @@ void iscsi_extracheck_is_wr_thread(struct iscsi_conn *conn)
        if (unlikely(current != conn->wr_task)) {
                while(in_softirq())
                        local_bh_enable();
-               printk(KERN_EMERG "conn %p wr_task != current (%p)", conn, current);
-               printk(KERN_EMERG "wr_task %p", conn->wr_task);
-               printk(KERN_EMERG "current->pid %d, wr_task->pid %d", current->pid,
-                       conn->wr_task->pid);
+               printk(KERN_EMERG "conn %p wr_task != current %p (pid %d)\n", conn,
+                       current, current->pid);
+               printk(KERN_EMERG "wr_state %x\n", conn->wr_state);
+               printk(KERN_EMERG "wr_task %p\n", conn->wr_task);
+               printk(KERN_EMERG "wr_task->pid %d\n", conn->wr_task->pid);
                sBUG();
        }
 }
index bee11a0..db9253e 100644 (file)
@@ -1438,13 +1438,13 @@ static int __cmnd_abort(struct iscsi_cmnd *cmnd)
        TRACE_MGMT_DBG("Aborting cmd %p, scst_cmd %p (scst state %x, "
                "ref_cnt %d, itt %x, sn %u, op %x, r2t_len %x, CDB op %x, "
                "size to write %u, is_unsolicited_data %d, "
-               "outstanding_r2t %d, data_waiting %d, sess->exp_cmd_sn %u)",
-               cmnd, cmnd->scst_cmd, cmnd->scst_state,
+               "outstanding_r2t %d, data_waiting %d, sess->exp_cmd_sn %u, "
+               "conn %p)", cmnd, cmnd->scst_cmd, cmnd->scst_state,
                atomic_read(&cmnd->ref_cnt), cmnd_itt(cmnd), cmnd->pdu.bhs.sn,
                cmnd_opcode(cmnd), cmnd->r2t_length, cmnd_scsicode(cmnd),
                cmnd_write_size(cmnd), cmnd->is_unsolicited_data,
                cmnd->outstanding_r2t, cmnd->data_waiting,
-               conn->session->exp_cmd_sn);
+               conn->session->exp_cmd_sn, conn);
 
 #ifdef NET_PAGE_CALLBACKS_DEFINED
        TRACE_MGMT_DBG("net_ref_cnt %d", atomic_read(&cmnd->net_ref_cnt));
index f1143d6..9d23c0a 100644 (file)
@@ -3013,6 +3013,7 @@ void scst_xmit_process_aborted_cmd(struct scst_cmd *cmd)
                if ((cmd->tgt_dev != NULL) &&
                    scst_is_ua_sense(cmd->sense_buffer)) {
                        /* This UA delivery is going to fail, so requeue it */
+                       TRACE_MGMT_DBG("Requeuing UA for aborted cmd %p", cmd);
                        scst_check_set_UA(cmd->tgt_dev, cmd->sense_buffer,
                                        sizeof(cmd->sense_buffer), 1);
                }
index 5068b65..ab8ed86 100644 (file)
@@ -2558,6 +2558,8 @@ static int scst_finish_cmd(struct scst_cmd *cmd)
                if ((cmd->tgt_dev != NULL) &&
                    scst_is_ua_sense(cmd->sense_buffer)) {
                        /* This UA delivery failed, so requeue it */
+                       TRACE_MGMT_DBG("Requeuing UA for delivery failed cmd "
+                               "%p", cmd);
                        scst_check_set_UA(cmd->tgt_dev, cmd->sense_buffer,
                                        sizeof(cmd->sense_buffer), 1);
                }