lib/iscsi: directly use task->scsi.offset in iscsi_send_datain
For sending data in pdus, we can direclty use task->scsi.offset, because task->scsi.offset is already set it before (in functions iscsi_conn_handle_queued_datain_tasks). So we should not update this offset in the task structure again. Signed-off-by: Ziye Yang <ziye.yang@intel.com> Change-Id: I873a6f7fb174145fd90fe84a00a80a4de2d49161 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5753 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
parent
45744ace4c
commit
6238e1a2d3
@ -2987,11 +2987,8 @@ iscsi_send_datain(struct spdk_iscsi_conn *conn,
|
||||
}
|
||||
DataSN++;
|
||||
|
||||
if (task->parent) {
|
||||
offset += primary->scsi.data_transferred;
|
||||
}
|
||||
offset += task->scsi.offset;
|
||||
to_be32(&rsph->buffer_offset, (uint32_t)offset);
|
||||
task->scsi.offset = offset;
|
||||
|
||||
if (F_bit && S_bit) {
|
||||
to_be32(&rsph->res_cnt, residual_len);
|
||||
|
Loading…
Reference in New Issue
Block a user