Date: Wed, 18 Jul 2012 18:10:28 +0000 (UTC) From: Sean Bruno <sbruno@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r238601 - head/sys/dev/aac Message-ID: <201207181810.q6IIASs1096858@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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@gmail.com> Reviewed by: scottl@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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201207181810.q6IIASs1096858>