Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 03 Aug 2012 10:37:24 -0700
From:      Sean Bruno <seanbru@yahoo-inc.com>
To:        Doug Ambrisko <ambrisko@ambrisko.com>
Cc:        "freebsd-scsi@freebsd.org" <freebsd-scsi@freebsd.org>
Subject:   Re: Missing bio_resid on error case in mfi_disk_complete()
Message-ID:  <1344015444.4472.0.camel@powernoodle.corp.yahoo.com>
In-Reply-To: <201203302225.q2UMPOrF055705@ambrisko.com>
References:  <201203302225.q2UMPOrF055705@ambrisko.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On Fri, 2012-03-30 at 15:25 -0700, Doug Ambrisko wrote:
> Andrew Boyer writes:
> | Hello Doug,
> | We noticed that the AIO system doesn't react to I/O failures that 
> | come from mfi disks; the commands appear to complete.  The upper 
> | layers are expecting bio->bio_resid to be non-zero if the bio failed.  
> | The patch below matches what scsi_da.c does in this case and also what 
> | mfi itself does in mfi_disk_strategy() if the I/O is invalid.
> | 
> | Does this make sense?  I meant to get this email sent before you 
> | started on the big merge.
> | 
> | Thanks,
> |  Andrew
> | 
> | Index: sys/dev/mfi/mfi_disk.c
> | ===================================================================
> | --- sys/dev/mfi/mfi_disk.c	(revision 233707)
> | +++ sys/dev/mfi/mfi_disk.c	(working copy)
> | @@ -274,6 +274,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);
> 
> Looks good to me.  I can check it in after I finish the merge.
> The driver is compile tested now.  So I'm about to check that in.
> 
> Thanks,
> 
> Doug A.
> _______________________________________________

Cleaning up some emails.  This was committed at svn r238371

Sean




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1344015444.4472.0.camel>