lib/iscsi: Move iscsi_queue_mgmt_task() down in the file

Move iscsi_queue_mgmt_task() down in the file to close to the
location that uses it.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I9c39a9211f0bf01165abebfba7a2eb846c10284f
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470270
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
Shuhei Matsumoto 2019-10-03 09:45:34 +09:00 committed by Changpeng Liu
parent 606b453fcd
commit 0bd219e5eb

View File

@ -3309,22 +3309,6 @@ iscsi_queue_task(struct spdk_iscsi_conn *conn, struct spdk_iscsi_task *task)
spdk_scsi_dev_queue_task(conn->dev, &task->scsi);
}
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);
}
int spdk_iscsi_conn_handle_queued_datain_tasks(struct spdk_iscsi_conn *conn)
{
struct spdk_iscsi_task *task;
@ -3811,6 +3795,22 @@ iscsi_conn_abort_queued_datain_tasks(struct spdk_iscsi_conn *conn,
return 0;
}
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);
}
static int
_iscsi_op_abort_task(void *arg)
{