Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Sep 2012 20:28:47 +0000 (UTC)
From:      Sean Bruno <sbruno@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r240876 - stable/9/sys/dev/aac
Message-ID:  <201209232028.q8NKSlh2070483@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: sbruno
Date: Sun Sep 23 20:28:47 2012
New Revision: 240876
URL: http://svn.freebsd.org/changeset/base/240876

Log:
  MFC r238601
  
  On BIO_ERROR, set bio_resid to stop losing data in the error case.
  
  Submitted by: Mark Johnston <markjdb@gmail.com>

Modified:
  stable/9/sys/dev/aac/aac_disk.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/aac/aac_disk.c
==============================================================================
--- stable/9/sys/dev/aac/aac_disk.c	Sun Sep 23 20:24:24 2012	(r240875)
+++ stable/9/sys/dev/aac/aac_disk.c	Sun Sep 23 20:28:47 2012	(r240876)
@@ -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);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201209232028.q8NKSlh2070483>