From 97dcf94d722642095e91c048f875e4e122d8fea2 Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Wed, 24 Oct 2012 07:35:30 -0700 Subject: [PATCH] iSCSI: when reconnecting we should not automatically requeue any DATA-OUT PDUs Dont requeue data-out pdus, or other pdus with the DELETE_WHEN_SENT flag, such as nops. These, like the DATA-OUT pdu will instead be automatically re-sent when the original write command is sent again. Signed-off-by: Ronnie Sahlberg --- lib/connect.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/connect.c b/lib/connect.c index 7907bed..9d0d8f8 100644 --- a/lib/connect.c +++ b/lib/connect.c @@ -285,6 +285,15 @@ try_again: continue; } + if (pdu->flags & ISCSI_PDU_DELETE_WHEN_SENT) { + /* We dont want to requeue things like DATA-OUT since these guys + * will be reissued automatically anyway once the corresponding + * write command is replayed. + */ + iscsi_free_pdu(old_iscsi, pdu); + continue; + } + pdu->itt = iscsi->itt++; iscsi_pdu_set_itt(pdu, pdu->itt);