svn commit: r240877 - stable/8/sys/dev/aac

Sean Bruno sbruno at FreeBSD.org
Sun Sep 23 20:31:46 UTC 2012


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 <markjdb at gmail.com>

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);
 }


More information about the svn-src-stable-8 mailing list