From 09621501932e6026bce7a45653e84233e2913549 Mon Sep 17 00:00:00 2001 From: Peter Lieven Date: Thu, 26 Mar 2015 16:34:35 +0100 Subject: [PATCH] nop: increase logging if more than one NOP is in flight Signed-off-by: Peter Lieven --- lib/nop.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/nop.c b/lib/nop.c index 993ed77..2a8c0dc 100644 --- a/lib/nop.c +++ b/lib/nop.c @@ -83,7 +83,9 @@ iscsi_nop_out_async(struct iscsi_context *iscsi, iscsi_command_cb cb, } iscsi->nops_in_flight++; - ISCSI_LOG(iscsi, 6, "NOP Out Send (nops_in_flight: %d)", iscsi->nops_in_flight); + ISCSI_LOG(iscsi, (iscsi->nops_in_flight > 1) ? 1 : 6, + "NOP Out Send (nops_in_flight: %d, pdu->cmdsn %08x, maxcmdsn %08x)", + iscsi->nops_in_flight, pdu->cmdsn, iscsi->maxcmdsn); return 0; } @@ -137,9 +139,9 @@ iscsi_process_nop_out_reply(struct iscsi_context *iscsi, struct iscsi_pdu *pdu, { struct iscsi_data data; - iscsi->nops_in_flight = 0; + ISCSI_LOG(iscsi, (iscsi->nops_in_flight > 1) ? 1 : 6, "NOP Out Reply received"); - ISCSI_LOG(iscsi, 6, "NOP Out Reply received"); + iscsi->nops_in_flight = 0; if (pdu->callback == NULL) { return 0;