@@ -233,8 +233,6 @@ struct iscsi_pdu {
|
|||||||
#define ISCSI_PDU_DROP_ON_RECONNECT 0x00000004
|
#define ISCSI_PDU_DROP_ON_RECONNECT 0x00000004
|
||||||
/* stop sending after this PDU has been sent */
|
/* stop sending after this PDU has been sent */
|
||||||
#define ISCSI_PDU_CORK_WHEN_SENT 0x00000008
|
#define ISCSI_PDU_CORK_WHEN_SENT 0x00000008
|
||||||
/* Fail the command with error on reconnect */
|
|
||||||
#define ISCSI_PDU_ERROR_ON_RECONNECT 0x00000016
|
|
||||||
|
|
||||||
uint32_t flags;
|
uint32_t flags;
|
||||||
|
|
||||||
|
|||||||
@@ -338,24 +338,16 @@ void iscsi_reconnect_cb(struct iscsi_context *iscsi _U_, int status,
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pdu->flags & ISCSI_PDU_ERROR_ON_RECONNECT) {
|
|
||||||
/*
|
|
||||||
* We only want to re-queue SCSI COMMAND PDUs.
|
|
||||||
* All other PDUs are discarded at this point.
|
|
||||||
* This includes DATA-OUT, NOP and task management.
|
|
||||||
*/
|
|
||||||
pdu->callback(iscsi, SCSI_STATUS_ERROR, NULL,
|
|
||||||
pdu->private_data);
|
|
||||||
iscsi_free_pdu(old_iscsi, pdu);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pdu->flags & ISCSI_PDU_DROP_ON_RECONNECT) {
|
if (pdu->flags & ISCSI_PDU_DROP_ON_RECONNECT) {
|
||||||
/*
|
/*
|
||||||
* We only want to re-queue SCSI COMMAND PDUs.
|
* We only want to re-queue SCSI COMMAND PDUs.
|
||||||
* All other PDUs are discarded at this point.
|
* All other PDUs are discarded at this point.
|
||||||
* This includes DATA-OUT, NOP and task management.
|
* This includes DATA-OUT, NOP and task management.
|
||||||
*/
|
*/
|
||||||
|
if (pdu->callback) {
|
||||||
|
pdu->callback(iscsi, SCSI_STATUS_CANCELLED,
|
||||||
|
NULL, pdu->private_data);
|
||||||
|
}
|
||||||
iscsi_free_pdu(old_iscsi, pdu);
|
iscsi_free_pdu(old_iscsi, pdu);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1267,7 +1267,7 @@ iscsi_logout_async(struct iscsi_context *iscsi, iscsi_command_cb cb,
|
|||||||
ISCSI_PDU_LOGOUT_REQUEST,
|
ISCSI_PDU_LOGOUT_REQUEST,
|
||||||
ISCSI_PDU_LOGOUT_RESPONSE,
|
ISCSI_PDU_LOGOUT_RESPONSE,
|
||||||
iscsi_itt_post_increment(iscsi),
|
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) {
|
if (pdu == NULL) {
|
||||||
iscsi_set_error(iscsi, "Out-of-memory: Failed to allocate "
|
iscsi_set_error(iscsi, "Out-of-memory: Failed to allocate "
|
||||||
"logout pdu.");
|
"logout pdu.");
|
||||||
|
|||||||
Reference in New Issue
Block a user