From owner-freebsd-scsi@FreeBSD.ORG Fri Aug 3 17:37:53 2012 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 38F38106564A for ; Fri, 3 Aug 2012 17:37:53 +0000 (UTC) (envelope-from seanbru@yahoo-inc.com) Received: from mrout2-b.corp.bf1.yahoo.com (mrout2-b.corp.bf1.yahoo.com [98.139.253.105]) by mx1.freebsd.org (Postfix) with ESMTP id D6EFB8FC0C for ; Fri, 3 Aug 2012 17:37:52 +0000 (UTC) Received: from [IPv6:::1] (proxy7.corp.yahoo.com [216.145.48.98]) by mrout2-b.corp.bf1.yahoo.com (8.14.4/8.14.4/y.out) with ESMTP id q73HbOeY049779; Fri, 3 Aug 2012 10:37:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yahoo-inc.com; s=cobra; t=1344015446; bh=ZU3/VlCmr7CM9Wf6R6myjV7xaYQPmOiDJtTpO0sJ0EE=; h=Subject:From:To:Cc:In-Reply-To:References:Content-Type:Date: Message-ID:Mime-Version:Content-Transfer-Encoding; b=ONc/xU/jsIJKKQNFDlclmFhqzJ8kTBnZAc28na1U+Z2jEjUpGzz/m05vpN/h0mLJ8 qDsFLEO7E0erX6J4ZRvSUGNSDal+oqt9dHg8YQ6wVuLgfgSI2vpKqtHEI8K05n5uOP FacB2+zRixyq8bdo01/mJn3ysgDyv2XaWpW9LIs0= From: Sean Bruno To: Doug Ambrisko In-Reply-To: <201203302225.q2UMPOrF055705@ambrisko.com> References: <201203302225.q2UMPOrF055705@ambrisko.com> Content-Type: text/plain; charset="UTF-8" Date: Fri, 03 Aug 2012 10:37:24 -0700 Message-ID: <1344015444.4472.0.camel@powernoodle.corp.yahoo.com> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit X-Milter-Version: master.31+4-gbc07cd5+ X-CLX-ID: 015445000 Cc: "freebsd-scsi@freebsd.org" Subject: Re: Missing bio_resid on error case in mfi_disk_complete() X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Aug 2012 17:37:53 -0000 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