iscsi: Fix the large IO failure procedure in iscsi layer
This patch fix the issue when large IO failed: when we handle the read command which need split, we need make sure all the subtasks to be handled if one of the subtask failed, this will make sure the command have chance return back to initiator. Change-Id: I0c01e1a34c6179fce37ab52c8121268b6ee31102 Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
This commit is contained in:
parent
3abfa7a610
commit
b865439deb
@ -427,6 +427,11 @@ spdk_iscsi_conn_free_pdu(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pd
|
||||
}
|
||||
spdk_iscsi_conn_handle_queued_tasks(conn);
|
||||
}
|
||||
} else if (pdu->bhs.opcode == ISCSI_OP_SCSI_RSP &&
|
||||
pdu->task->scsi.status != SPDK_SCSI_STATUS_GOOD) {
|
||||
if (pdu->task->scsi.offset > 0) {
|
||||
spdk_iscsi_task_put(spdk_iscsi_task_get_primary(pdu->task));
|
||||
}
|
||||
}
|
||||
spdk_iscsi_task_put(pdu->task);
|
||||
}
|
||||
|
@ -2703,11 +2703,12 @@ spdk_iscsi_transfer_in(struct spdk_iscsi_conn *conn,
|
||||
if (task->scsi.status != SPDK_SCSI_STATUS_GOOD) {
|
||||
if (task != primary) {
|
||||
conn->data_in_cnt--;
|
||||
spdk_iscsi_conn_handle_queued_tasks(conn);
|
||||
} else {
|
||||
/* handle the case that it is a primary task which has subtasks */
|
||||
if (primary->scsi.transfer_len != task->scsi.length) {
|
||||
conn->data_in_cnt--;
|
||||
spdk_iscsi_task_put(task);
|
||||
spdk_iscsi_conn_handle_queued_tasks(conn);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user