Date: Wed, 11 Jul 2012 18:16:54 +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: r238371 - head/sys/dev/mfi Message-ID: <201207111816.q6BIGscc058070@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: sbruno Date: Wed Jul 11 18:16:54 2012 New Revision: 238371 URL: http://svn.freebsd.org/changeset/base/238371 Log: When an MFI command fails, the driver needs to set bio->bio_resid so that the upper levels notice. Otherwise we see commands silently failing leading to data corruption. This mirrors dadone() Submitted by: Andrew Boyer aboyer@averesystems.com Reviewed by: scottl@freebsd.org MFC after: 2 weeks Modified: head/sys/dev/mfi/mfi_disk.c Modified: head/sys/dev/mfi/mfi_disk.c ============================================================================== --- head/sys/dev/mfi/mfi_disk.c Wed Jul 11 17:11:54 2012 (r238370) +++ head/sys/dev/mfi/mfi_disk.c Wed Jul 11 18:16:54 2012 (r238371) @@ -298,6 +298,7 @@ mfi_disk_complete(struct bio *bio) hdr = bio->bio_driver1; if (bio->bio_flags & BIO_ERROR) { + bio->bio_resid = bio->bio_bcount; if (bio->bio_error == 0) bio->bio_error = EIO; disk_err(bio, "hard error", -1, 1);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201207111816.q6BIGscc058070>