Date: Sun, 20 Sep 2015 11:39:20 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288021 - head/sys/cam/ctl Message-ID: <201509201139.t8KBdK8V057908@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Sun Sep 20 11:39:19 2015 New Revision: 288021 URL: https://svnweb.freebsd.org/changeset/base/288021 Log: Mark with DMA flag I/Os waiting for iSCSI write data after R2T. Reads and immediate writes are not blocking, so don't bother. Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend_iscsi.c Sun Sep 20 10:40:30 2015 (r288020) +++ head/sys/cam/ctl/ctl_frontend_iscsi.c Sun Sep 20 11:39:19 2015 (r288021) @@ -966,6 +966,7 @@ cfiscsi_pdu_handle_data_out(struct icl_p 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 c * 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_i #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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201509201139.t8KBdK8V057908>