LOGIN: Dont increment the ITT if the target wants another round of LOGIN

If the login phase takes multiple login requests we should keep the ITT the same for all login requets and not increment it.
A multi-phase login is only a single task eventhough it may be spread across multiple login requetst.

While most targets are forgiving and still work if we increment the ITT for each login command, some targets such as SOLARIS/COMSTAR is NOT forgiving if we break the protocol in this situation.

Fix the ITT handling so that we dont make SOLARIS/COMSTAR upset.

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
This commit is contained in:
Ronnie Sahlberg
2012-06-02 15:41:38 +10:00
parent a0a4677dfa
commit 819248a519

View File

@@ -735,8 +735,10 @@ iscsi_login_async(struct iscsi_context *iscsi, iscsi_command_cb cb,
return -1;
}
pdu = iscsi_allocate_pdu(iscsi, ISCSI_PDU_LOGIN_REQUEST,
ISCSI_PDU_LOGIN_RESPONSE);
pdu = iscsi_allocate_pdu_with_itt_flags(iscsi,
ISCSI_PDU_LOGIN_REQUEST,
ISCSI_PDU_LOGIN_RESPONSE,
iscsi->itt, 0);
if (pdu == NULL) {
iscsi_set_error(iscsi, "Out-of-memory: Failed to allocate "
"login pdu.");