iscsi: suppress successful iscsi logout notifications
We did this a while ago for login notifications - do it for logout as well. While here, just use SPDK_DEBUGLOG instead of printing to a buffer first. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: I77f566d139cd818428371ec887efeca6eee08898 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/451062 Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
bde47b0e33
commit
65d9e4594a
@ -2458,7 +2458,6 @@ iscsi_op_text(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu)
|
|||||||
static int
|
static int
|
||||||
iscsi_op_logout(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu)
|
iscsi_op_logout(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu)
|
||||||
{
|
{
|
||||||
char buf[MAX_TMPBUF];
|
|
||||||
struct spdk_iscsi_pdu *rsp_pdu;
|
struct spdk_iscsi_pdu *rsp_pdu;
|
||||||
uint32_t task_tag;
|
uint32_t task_tag;
|
||||||
uint32_t CmdSN;
|
uint32_t CmdSN;
|
||||||
@ -2553,38 +2552,36 @@ iscsi_op_logout(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu)
|
|||||||
* login failed but initiator still sent a logout rather than
|
* login failed but initiator still sent a logout rather than
|
||||||
* just closing the TCP connection.
|
* just closing the TCP connection.
|
||||||
*/
|
*/
|
||||||
snprintf(buf, sizeof buf, "Logout(login failed) from %s (%s) on"
|
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "Logout(login failed) from %s (%s) on"
|
||||||
" (%s:%s,%d)\n",
|
" (%s:%s,%d)\n",
|
||||||
conn->initiator_name, conn->initiator_addr,
|
conn->initiator_name, conn->initiator_addr,
|
||||||
conn->portal_host, conn->portal_port, conn->pg_tag);
|
conn->portal_host, conn->portal_port, conn->pg_tag);
|
||||||
} else if (spdk_iscsi_param_eq_val(conn->sess->params, "SessionType", "Normal")) {
|
} else if (spdk_iscsi_param_eq_val(conn->sess->params, "SessionType", "Normal")) {
|
||||||
snprintf(buf, sizeof buf, "Logout from %s (%s) on %s tgt_node%d"
|
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "Logout from %s (%s) on %s tgt_node%d"
|
||||||
" (%s:%s,%d), ISID=%"PRIx64", TSIH=%u,"
|
" (%s:%s,%d), ISID=%"PRIx64", TSIH=%u,"
|
||||||
" CID=%u, HeaderDigest=%s, DataDigest=%s\n",
|
" CID=%u, HeaderDigest=%s, DataDigest=%s\n",
|
||||||
conn->initiator_name, conn->initiator_addr,
|
conn->initiator_name, conn->initiator_addr,
|
||||||
conn->target->name, conn->target->num,
|
conn->target->name, conn->target->num,
|
||||||
conn->portal_host, conn->portal_port, conn->pg_tag,
|
conn->portal_host, conn->portal_port, conn->pg_tag,
|
||||||
conn->sess->isid, conn->sess->tsih, conn->cid,
|
conn->sess->isid, conn->sess->tsih, conn->cid,
|
||||||
(spdk_iscsi_param_eq_val(conn->params, "HeaderDigest", "CRC32C")
|
(spdk_iscsi_param_eq_val(conn->params, "HeaderDigest", "CRC32C")
|
||||||
? "on" : "off"),
|
? "on" : "off"),
|
||||||
(spdk_iscsi_param_eq_val(conn->params, "DataDigest", "CRC32C")
|
(spdk_iscsi_param_eq_val(conn->params, "DataDigest", "CRC32C")
|
||||||
? "on" : "off"));
|
? "on" : "off"));
|
||||||
} else {
|
} else {
|
||||||
/* discovery session */
|
/* discovery session */
|
||||||
snprintf(buf, sizeof buf, "Logout(discovery) from %s (%s) on"
|
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "Logout(discovery) from %s (%s) on"
|
||||||
" (%s:%s,%d), ISID=%"PRIx64", TSIH=%u,"
|
" (%s:%s,%d), ISID=%"PRIx64", TSIH=%u,"
|
||||||
" CID=%u, HeaderDigest=%s, DataDigest=%s\n",
|
" CID=%u, HeaderDigest=%s, DataDigest=%s\n",
|
||||||
conn->initiator_name, conn->initiator_addr,
|
conn->initiator_name, conn->initiator_addr,
|
||||||
conn->portal_host, conn->portal_port, conn->pg_tag,
|
conn->portal_host, conn->portal_port, conn->pg_tag,
|
||||||
conn->sess->isid, conn->sess->tsih, conn->cid,
|
conn->sess->isid, conn->sess->tsih, conn->cid,
|
||||||
(spdk_iscsi_param_eq_val(conn->params, "HeaderDigest", "CRC32C")
|
(spdk_iscsi_param_eq_val(conn->params, "HeaderDigest", "CRC32C")
|
||||||
? "on" : "off"),
|
? "on" : "off"),
|
||||||
(spdk_iscsi_param_eq_val(conn->params, "DataDigest", "CRC32C")
|
(spdk_iscsi_param_eq_val(conn->params, "DataDigest", "CRC32C")
|
||||||
? "on" : "off"));
|
? "on" : "off"));
|
||||||
}
|
}
|
||||||
|
|
||||||
SPDK_NOTICELOG("%s", buf);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user