aboutsummaryrefslogtreecommitdiff
path: root/sys/cam/ctl/ctl_frontend_iscsi.c
diff options
context:
space:
mode:
authorAlexander Motin <mav@FreeBSD.org>2015-09-20 11:39:19 +0000
committerAlexander Motin <mav@FreeBSD.org>2015-09-20 11:39:19 +0000
commit218d25d00bcc593f77d900e6c17f6c7f99abbb44 (patch)
tree363d7b6ec65f3475fdc89dcf58c8048f6278ecd3 /sys/cam/ctl/ctl_frontend_iscsi.c
parentb22213694ed73221ad838fae58b15d4f0eaf4647 (diff)
downloadsrc-218d25d00bcc593f77d900e6c17f6c7f99abbb44.tar.gz
src-218d25d00bcc593f77d900e6c17f6c7f99abbb44.zip
Mark with DMA flag I/Os waiting for iSCSI write data after R2T.
Reads and immediate writes are not blocking, so don't bother.
Notes
Notes: svn path=/head/; revision=288021
Diffstat (limited to 'sys/cam/ctl/ctl_frontend_iscsi.c')
-rw-r--r--sys/cam/ctl/ctl_frontend_iscsi.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/cam/ctl/ctl_frontend_iscsi.c b/sys/cam/ctl/ctl_frontend_iscsi.c
index f993691a799e..79a1fb5ac411 100644
--- a/sys/cam/ctl/ctl_frontend_iscsi.c
+++ b/sys/cam/ctl/ctl_frontend_iscsi.c
@@ -966,6 +966,7 @@ cfiscsi_pdu_handle_data_out(struct icl_pdu *request)
done = (io->scsiio.ext_data_filled != cdw->cdw_r2t_end ||
io->scsiio.ext_data_filled == io->scsiio.kern_data_len);
cfiscsi_data_wait_free(cs, cdw);
+ io->io_hdr.flags &= ~CTL_FLAG_DMA_INPROG;
if (done)
io->scsiio.be_move_done(io);
else
@@ -1178,6 +1179,7 @@ cfiscsi_session_terminate_tasks(struct cfiscsi_session *cs)
* assuming that the data transfer actually succeeded
* and writing uninitialized data to disk.
*/
+ cdw->cdw_ctl_io->io_hdr.flags &= ~CTL_FLAG_DMA_INPROG;
cdw->cdw_ctl_io->scsiio.io_hdr.port_status = 42;
cdw->cdw_ctl_io->scsiio.be_move_done(cdw->cdw_ctl_io);
cfiscsi_data_wait_free(cs, cdw);
@@ -2738,6 +2740,7 @@ cfiscsi_datamove_out(union ctl_io *io)
cfiscsi_session_terminate(cs);
return;
}
+ io->io_hdr.flags |= CTL_FLAG_DMA_INPROG;
bhsr2t = (struct iscsi_bhs_r2t *)response->ip_bhs;
bhsr2t->bhsr2t_opcode = ISCSI_BHS_OPCODE_R2T;
bhsr2t->bhsr2t_flags = 0x80;
@@ -2914,6 +2917,8 @@ cfiscsi_task_management_done(union ctl_io *io)
#endif
TAILQ_REMOVE(&cs->cs_waiting_for_data_out,
cdw, cdw_next);
+ io->io_hdr.flags &= ~CTL_FLAG_DMA_INPROG;
+ cdw->cdw_ctl_io->scsiio.io_hdr.port_status = 43;
cdw->cdw_ctl_io->scsiio.be_move_done(cdw->cdw_ctl_io);
cfiscsi_data_wait_free(cs, cdw);
}