From owner-svn-src-stable-8@FreeBSD.ORG Sun Sep 23 20:31:46 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 08EA61065675; Sun, 23 Sep 2012 20:31:46 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E78EC8FC08; Sun, 23 Sep 2012 20:31:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8NKVjSo071039; Sun, 23 Sep 2012 20:31:45 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8NKVjRT071036; Sun, 23 Sep 2012 20:31:45 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201209232031.q8NKVjRT071036@svn.freebsd.org> From: Sean Bruno Date: Sun, 23 Sep 2012 20:31:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240877 - stable/8/sys/dev/aac X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Sep 2012 20:31:46 -0000 Author: sbruno Date: Sun Sep 23 20:31:45 2012 New Revision: 240877 URL: http://svn.freebsd.org/changeset/base/240877 Log: MFC r238601 On BIO_ERROR, set bio_resid to stop losing data in the error case. Submitted by: Mark Johnston Modified: stable/8/sys/dev/aac/aac_disk.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/aac/ (props changed) Modified: stable/8/sys/dev/aac/aac_disk.c ============================================================================== --- stable/8/sys/dev/aac/aac_disk.c Sun Sep 23 20:28:47 2012 (r240876) +++ stable/8/sys/dev/aac/aac_disk.c Sun Sep 23 20:31:45 2012 (r240877) @@ -334,8 +334,10 @@ aac_biodone(struct bio *bp) { fwprintf(NULL, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - if (bp->bio_flags & BIO_ERROR) + if (bp->bio_flags & BIO_ERROR) { + bp->bio_resid = bp->bio_bcount; disk_err(bp, "hard error", -1, 1); + } biodone(bp); }