[Midnightbsd-cvs] src [8111] trunk/sys/dev/mfi/mfi_disk.c: When an MFI command fails, the driver needs to set bio->bio_resid so that
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Fri Sep 16 16:28:32 EDT 2016
Revision: 8111
http://svnweb.midnightbsd.org/src/?rev=8111
Author: laffer1
Date: 2016-09-16 16:28:32 -0400 (Fri, 16 Sep 2016)
Log Message:
-----------
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 at averesystems.com
Modified Paths:
--------------
trunk/sys/dev/mfi/mfi_disk.c
Modified: trunk/sys/dev/mfi/mfi_disk.c
===================================================================
--- trunk/sys/dev/mfi/mfi_disk.c 2016-09-16 20:27:37 UTC (rev 8110)
+++ trunk/sys/dev/mfi/mfi_disk.c 2016-09-16 20:28:32 UTC (rev 8111)
@@ -306,6 +306,7 @@
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);
More information about the Midnightbsd-cvs
mailing list