Files
scst/iscsi-scst/kernel/iscsi_dbg.h
T
Vladislav Bolkhovitin 05d1bbfedc A huge chunk of related to each other changes, which had to be tested together.
iSCSI-SCST: A huge improvements in errors recovery and iSCSI RFC complaince as well as performance. Also:

 - Fixes and improvements for MaxOutstandingR2T>1

 - Flow control tracing added.

 - Cleanups

SCST core:

 - Now for scst_cmd_init_stage1_done() commands preprocessing_done() is always called before xmit_response(), even in case of abort or error.

 - Fixed recently introduced bug, which can lead to sending responses for aborted commands after reply on the corresponding TM command already sent.

 - Flow control tracing added.

 - Now it is possible to call functions setting commands execution status (e.g., scst_set_cmd_error_status()) several times for the same command. Only the first call will be completed, other calls - ignored.

 - All commands are counted and shown in proc/sysfs now. Before only active, i.e. not yet executed commands, were counted and shown there.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1431 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-01-06 13:02:22 +00:00

61 lines
1.9 KiB
C

/*
* Copyright (C) 2007 - 2009 Vladislav Bolkhovitin
* Copyright (C) 2007 - 2009 ID7 Ltd.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation, version 2
* of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#ifndef ISCSI_DBG_H
#define ISCSI_DBG_H
#define LOG_PREFIX "iscsi-scst"
#include <scst_debug.h>
#define TRACE_D_WRITE 0x80000000
#define TRACE_CONN_OC 0x40000000
#define TRACE_D_IOV 0x20000000
#define TRACE_D_DUMP_PDU 0x10000000
#define TRACE_NET_PG 0x08000000
#define TRACE_CONN_OC_DBG 0x04000000
#ifdef CONFIG_SCST_DEBUG
#define ISCSI_DEFAULT_LOG_FLAGS (TRACE_FUNCTION | TRACE_LINE | TRACE_PID | \
TRACE_OUT_OF_MEM | TRACE_MGMT | TRACE_MGMT_MINOR | TRACE_MGMT_DEBUG | \
TRACE_MINOR | TRACE_SPECIAL | TRACE_CONN_OC)
#else
#define ISCSI_DEFAULT_LOG_FLAGS (TRACE_OUT_OF_MEM | TRACE_MGMT | \
TRACE_MINOR | TRACE_SPECIAL)
#endif
#ifdef CONFIG_SCST_DEBUG
struct iscsi_pdu;
struct iscsi_cmnd;
extern void iscsi_dump_pdu(struct iscsi_pdu *pdu);
extern unsigned long iscsi_get_flow_ctrl_or_mgmt_dbg_log_flag(
struct iscsi_cmnd *cmnd);
#else
#define iscsi_dump_pdu(x) do {} while (0)
#define iscsi_get_flow_ctrl_or_mgmt_dbg_log_flag(x) do {} while (0)
#endif
#if defined(CONFIG_SCST_DEBUG) || defined(CONFIG_SCST_TRACING)
extern unsigned long iscsi_trace_flag;
#define trace_flag iscsi_trace_flag
#endif
#define TRACE_CONN_CLOSE(args...) TRACE_DBG_FLAG(TRACE_DEBUG|TRACE_CONN_OC, args)
#define TRACE_CONN_CLOSE_DBG(args...) TRACE(TRACE_CONN_OC_DBG, args)
#define TRACE_NET_PAGE(args...) TRACE_DBG_FLAG(TRACE_NET_PG, args)
#define TRACE_WRITE(args...) TRACE_DBG_FLAG(TRACE_DEBUG|TRACE_D_WRITE, args)
#endif