lib/iscsi: Move get_transfer_task() up in the file
Move get_transfer_task() up in the file closer to the location of related functions. Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: I7ca7fff3e193367992d556d4cd28ef65efe55ef2 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470268 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
058b13081e
commit
e1a6f2b70d
@ -3060,6 +3060,20 @@ void spdk_clear_all_transfer_task(struct spdk_iscsi_conn *conn,
|
||||
start_queued_transfer_tasks(conn);
|
||||
}
|
||||
|
||||
static struct spdk_iscsi_task *
|
||||
get_transfer_task(struct spdk_iscsi_conn *conn, uint32_t transfer_tag)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < conn->pending_r2t; i++) {
|
||||
if (conn->outstanding_r2t_tasks[i]->ttt == transfer_tag) {
|
||||
return (conn->outstanding_r2t_tasks[i]);
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static int
|
||||
iscsi_send_datain(struct spdk_iscsi_conn *conn,
|
||||
struct spdk_iscsi_task *task, int datain_flag,
|
||||
@ -3715,20 +3729,6 @@ void spdk_iscsi_task_response(struct spdk_iscsi_conn *conn,
|
||||
spdk_iscsi_conn_write_pdu(conn, rsp_pdu);
|
||||
}
|
||||
|
||||
static struct spdk_iscsi_task *
|
||||
get_transfer_task(struct spdk_iscsi_conn *conn, uint32_t transfer_tag)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < conn->pending_r2t; i++) {
|
||||
if (conn->outstanding_r2t_tasks[i]->ttt == transfer_tag) {
|
||||
return (conn->outstanding_r2t_tasks[i]);
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static int
|
||||
_iscsi_conn_abort_queued_datain_task(struct spdk_iscsi_conn *conn,
|
||||
struct spdk_iscsi_task *task)
|
||||
|
Loading…
Reference in New Issue
Block a user