From owner-svn-src-stable@FreeBSD.ORG Fri Jul 4 16:11:31 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3FDB5918; Fri, 4 Jul 2014 16:11:31 +0000 (UTC) Received: from svn.freebsd.org (svn.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 1276E2938; Fri, 4 Jul 2014 16:11:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s64GBU0n038992; Fri, 4 Jul 2014 16:11:30 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s64GBUc2038990; Fri, 4 Jul 2014 16:11:30 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407041611.s64GBUc2038990@svn.freebsd.org> From: Alexander Motin Date: Fri, 4 Jul 2014 16:11:30 +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: r268261 - 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.18 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: Fri, 04 Jul 2014 16:11:31 -0000 Author: mav Date: Fri Jul 4 16:11:30 2014 New Revision: 268261 URL: http://svnweb.freebsd.org/changeset/base/268261 Log: MFC r267641: Add some more CTL_FLAG_ABORT check points. This should allow to abort commands doing mostly disk I/O, such as VERIFY or WRITE SAME. Before this change CTL_FLAG_ABORT was only checked around data moves, which for these commands may not happen for a very long time. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_backend_block.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Fri Jul 4 16:10:14 2014 (r268260) +++ stable/10/sys/cam/ctl/ctl.c Fri Jul 4 16:11:30 2014 (r268261) @@ -5009,9 +5009,10 @@ ctl_data_submit_done(union ctl_io *io) * If there is an error, though, we don't want to keep processing. * Instead, just send status back to the initiator. */ - if ((io->io_hdr.flags & CTL_FLAG_IO_CONT) - && (((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE) - || ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS))) { + if ((io->io_hdr.flags & CTL_FLAG_IO_CONT) && + (io->io_hdr.flags & CTL_FLAG_ABORT) == 0 && + ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE || + (io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS)) { io->scsiio.io_cont(io); return; } Modified: stable/10/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_block.c Fri Jul 4 16:10:14 2014 (r268260) +++ stable/10/sys/cam/ctl/ctl_backend_block.c Fri Jul 4 16:11:30 2014 (r268261) @@ -944,8 +944,9 @@ ctl_be_block_cw_done_ws(struct ctl_be_bl io = beio->io; ctl_free_beio(beio); - if (((io->io_hdr.status & CTL_STATUS_MASK) != CTL_STATUS_NONE) - && ((io->io_hdr.status & CTL_STATUS_MASK) != CTL_SUCCESS)) { + if ((io->io_hdr.flags & CTL_FLAG_ABORT) || + ((io->io_hdr.status & CTL_STATUS_MASK) != CTL_STATUS_NONE && + (io->io_hdr.status & CTL_STATUS_MASK) != CTL_SUCCESS)) { ctl_config_write_done(io); return; } @@ -1186,8 +1187,9 @@ ctl_be_block_next(struct ctl_be_block_io io = beio->io; be_lun = beio->lun; ctl_free_beio(beio); - if (((io->io_hdr.status & CTL_STATUS_MASK) != CTL_STATUS_NONE) - && ((io->io_hdr.status & CTL_STATUS_MASK) != CTL_SUCCESS)) { + if ((io->io_hdr.flags & CTL_FLAG_ABORT) || + ((io->io_hdr.status & CTL_STATUS_MASK) != CTL_STATUS_NONE && + (io->io_hdr.status & CTL_STATUS_MASK) != CTL_SUCCESS)) { ctl_data_submit_done(io); return; }