Date: Sun, 23 Sep 2012 20:24:25 +0000 (UTC) From: Sean Bruno <sbruno@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r240875 - stable/7/sys/dev/mfi Message-ID: <201209232024.q8NKOPdd069717@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: sbruno Date: Sun Sep 23 20:24:24 2012 New Revision: 240875 URL: http://svn.freebsd.org/changeset/base/240875 Log: MFC r238371 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 Modified: stable/7/sys/dev/mfi/mfi_disk.c Directory Properties: stable/7/sys/ (props changed) Modified: stable/7/sys/dev/mfi/mfi_disk.c ============================================================================== --- stable/7/sys/dev/mfi/mfi_disk.c Sun Sep 23 20:24:17 2012 (r240874) +++ stable/7/sys/dev/mfi/mfi_disk.c Sun Sep 23 20:24:24 2012 (r240875) @@ -291,6 +291,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?201209232024.q8NKOPdd069717>