From owner-svn-src-all@FreeBSD.ORG Tue Jul 29 07:40:15 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 0035DE73; Tue, 29 Jul 2014 07:40:14 +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 E1460246B; Tue, 29 Jul 2014 07:40:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s6T7eE4c016806; Tue, 29 Jul 2014 07:40:14 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s6T7eE19016804; Tue, 29 Jul 2014 07:40:14 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407290740.s6T7eE19016804@svn.freebsd.org> From: Alexander Motin Date: Tue, 29 Jul 2014 07:40:14 +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: r269226 - 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-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: Tue, 29 Jul 2014 07:40:15 -0000 Author: mav Date: Tue Jul 29 07:40:14 2014 New Revision: 269226 URL: http://svnweb.freebsd.org/changeset/base/269226 Log: MFC r269122: Fix infinite loop, when doing WRITE SAME on file-backed LUN. Modified: stable/10/sys/cam/ctl/ctl_backend_block.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_block.c Tue Jul 29 07:36:38 2014 (r269225) +++ stable/10/sys/cam/ctl/ctl_backend_block.c Tue Jul 29 07:40:14 2014 (r269226) @@ -725,10 +725,11 @@ ctl_be_block_dispatch_file(struct ctl_be } /* - * If this is a write, we're all done. + * If this is a write or a verify, we're all done. * If this is a read, we can now send the data to the user. */ - if (ARGS(io)->flags & (CTL_LLF_WRITE | CTL_LLF_VERIFY)) { + if ((beio->bio_cmd == BIO_WRITE) || + (ARGS(io)->flags & CTL_LLF_VERIFY)) { ctl_set_success(&io->scsiio); ctl_complete_beio(beio); } else {