Author: sbruno
Date: Wed Jul 18 18:10:27 2012
New Revision: 238601
URL: http://svn.freebsd.org/changeset/base/238601

Log:
  On BIO_ERROR, set bio_resid to stop losing data in the error case.
  
  Submitted by: Mark Johnston <mark...@gmail.com>
  Reviewed by:  sco...@freebsd.org
  MFC after:    2 weeks

Modified:
  head/sys/dev/aac/aac_disk.c

Modified: head/sys/dev/aac/aac_disk.c
==============================================================================
--- head/sys/dev/aac/aac_disk.c Wed Jul 18 16:13:03 2012        (r238600)
+++ head/sys/dev/aac/aac_disk.c Wed Jul 18 18:10:27 2012        (r238601)
@@ -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);
 }
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to