From owner-svn-src-all@FreeBSD.ORG Thu Jun 19 12:43:42 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3A750F3; Thu, 19 Jun 2014 12:43:42 +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 0D4832BE3; Thu, 19 Jun 2014 12:43:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5JChfjx014975; Thu, 19 Jun 2014 12:43:41 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5JChfmg014973; Thu, 19 Jun 2014 12:43:41 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201406191243.s5JChfmg014973@svn.freebsd.org> From: Alexander Motin Date: Thu, 19 Jun 2014 12:43:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r267641 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jun 2014 12:43:42 -0000 Author: mav Date: Thu Jun 19 12:43:41 2014 New Revision: 267641 URL: http://svnweb.freebsd.org/changeset/base/267641 Log: 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. MFC after: 2 weeks Modified: head/sys/cam/ctl/ctl.c head/sys/cam/ctl/ctl_backend_block.c Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Thu Jun 19 11:49:36 2014 (r267640) +++ head/sys/cam/ctl/ctl.c Thu Jun 19 12:43:41 2014 (r267641) @@ -5003,9 +5003,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: head/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- head/sys/cam/ctl/ctl_backend_block.c Thu Jun 19 11:49:36 2014 (r267640) +++ head/sys/cam/ctl/ctl_backend_block.c Thu Jun 19 12:43:41 2014 (r267641) @@ -942,8 +942,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; } @@ -1184,8 +1185,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; }