Skip to content

Commit 09ff742

Browse files
Mike ChristieChristoph Hellwig
authored andcommitted
libiscsi: return new error code when nop times out
When a iscsi nop as ping timedout we were failing with the common connection error code, ISCSI_ERR_CONN_FAILED. This patch adds a new error code for this problem so can properly track/distinguish in userspace. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Acked-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Christoph Hellwig <hch@lst.de>
1 parent 719e587 commit 09ff742

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

‎drivers/scsi/libiscsi.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2097,7 +2097,7 @@ static void iscsi_check_transport_timeouts(unsigned long data)
20972097
conn->ping_timeout, conn->recv_timeout,
20982098
last_recv, conn->last_ping, jiffies);
20992099
spin_unlock(&session->frwd_lock);
2100-
iscsi_conn_failure(conn, ISCSI_ERR_CONN_FAILED);
2100+
iscsi_conn_failure(conn, ISCSI_ERR_NOP_TIMEDOUT);
21012101
return;
21022102
}
21032103

‎include/scsi/iscsi_if.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,7 @@ enum iscsi_err {
527527
ISCSI_ERR_XMIT_FAILED = ISCSI_ERR_BASE + 19,
528528
ISCSI_ERR_TCP_CONN_CLOSE = ISCSI_ERR_BASE + 20,
529529
ISCSI_ERR_SCSI_EH_SESSION_RST = ISCSI_ERR_BASE + 21,
530+
ISCSI_ERR_NOP_TIMEDOUT = ISCSI_ERR_BASE + 22,
530531
};
531532

532533
/*

0 commit comments

Comments
 (0)