From owner-svn-src-stable@freebsd.org Mon Oct 5 10:47:20 2015 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1894C9B1EEF; Mon, 5 Oct 2015 10:47:20 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E4D549E9; Mon, 5 Oct 2015 10:47:19 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t95AlJBp073271; Mon, 5 Oct 2015 10:47:19 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t95AlJJV073270; Mon, 5 Oct 2015 10:47:19 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510051047.t95AlJJV073270@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 5 Oct 2015 10:47:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288782 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2015 10:47:20 -0000 Author: mav Date: Mon Oct 5 10:47:18 2015 New Revision: 288782 URL: https://svnweb.freebsd.org/changeset/base/288782 Log: MFC r288021: 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: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Mon Oct 5 10:46:24 2015 (r288781) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Mon Oct 5 10:47:18 2015 (r288782) @@ -963,6 +963,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); uma_zfree(cfiscsi_data_wait_zone, cdw); + io->io_hdr.flags &= ~CTL_FLAG_DMA_INPROG; if (done) io->scsiio.be_move_done(io); else @@ -1136,6 +1137,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); uma_zfree(cfiscsi_data_wait_zone, cdw); @@ -2665,6 +2667,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; @@ -2841,6 +2844,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); uma_zfree(cfiscsi_data_wait_zone, cdw); }