lib/iscsi: Re-check LUN hot plug after aborting SCSI Data-In tasks

LUN hot plug was not checked after aborting SCSI Data-In tasks.

This patch is for the Github issue #938.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I131f9944d71e5fdab53f3010072ea7ed5293158c
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469827
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
Shuhei Matsumoto 2019-09-30 18:27:37 +09:00 committed by Tomasz Zawadzki
parent aff8f83bee
commit 04c9c3451f

View File

@ -2845,6 +2845,16 @@ iscsi_queue_task(struct spdk_iscsi_conn *conn, struct spdk_iscsi_task *task)
static void
iscsi_queue_mgmt_task(struct spdk_iscsi_conn *conn, struct spdk_iscsi_task *task)
{
struct spdk_scsi_lun *lun;
lun = spdk_scsi_dev_get_lun(conn->dev, task->lun_id);
if (lun == NULL) {
task->scsi.response = SPDK_SCSI_TASK_MGMT_RESP_INVALID_LUN;
spdk_iscsi_task_mgmt_response(conn, task);
spdk_iscsi_task_put(task);
return;
}
spdk_scsi_dev_queue_mgmt_task(conn->dev, &task->scsi);
}