Revert "Fail pending LOGOUT commands on session reconnect"

This seriously breaks qemu NOP timeouts and probably other things.
The reason is that the

define ISCSI_PDU_ERROR_ON_RECONNECT	0x00000016

is masking bits 0x2 and 0x4 as well.

Correctly it should read:
define ISCSI_PDU_ERROR_ON_RECONNECT	0x00000010

However, the better solution for this approach is invoke all callbacks
of PDUs which carry the ISCSI_PDU_DROP_ON_RECONNECT flag. This will
make sure that callbacks of whatever sync tasks are invoked.

This reverts commit 0407cf6aed.
This commit is contained in:
Peter Lieven
2016-03-17 11:41:36 +01:00
parent d6e76e8ba4
commit 97406c5b36
3 changed files with 1 additions and 15 deletions

View File

@@ -1267,7 +1267,7 @@ iscsi_logout_async(struct iscsi_context *iscsi, iscsi_command_cb cb,
ISCSI_PDU_LOGOUT_REQUEST,
ISCSI_PDU_LOGOUT_RESPONSE,
iscsi_itt_post_increment(iscsi),
ISCSI_PDU_ERROR_ON_RECONNECT|ISCSI_PDU_CORK_WHEN_SENT);
ISCSI_PDU_DROP_ON_RECONNECT|ISCSI_PDU_CORK_WHEN_SENT);
if (pdu == NULL) {
iscsi_set_error(iscsi, "Out-of-memory: Failed to allocate "
"logout pdu.");