svn commit: r238601 - head/sys/dev/aac
Sean Bruno
sbruno at FreeBSD.org
Wed Jul 18 18:10:28 UTC 2012
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 <markjdb at gmail.com>
Reviewed by: scottl at 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);
}
More information about the svn-src-head
mailing list