From owner-freebsd-scsi@FreeBSD.ORG Fri Mar 30 22:15:13 2012 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 42770106564A for ; Fri, 30 Mar 2012 22:15:13 +0000 (UTC) (envelope-from aboyer@averesystems.com) Received: from zimbra.averesystems.com (75-149-8-245-Pennsylvania.hfc.comcastbusiness.net [75.149.8.245]) by mx1.freebsd.org (Postfix) with ESMTP id 108B58FC0A for ; Fri, 30 Mar 2012 22:15:12 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by zimbra.averesystems.com (Postfix) with ESMTP id 19AE9446003; Fri, 30 Mar 2012 18:15:22 -0400 (EDT) X-Virus-Scanned: amavisd-new at averesystems.com Received: from zimbra.averesystems.com ([127.0.0.1]) by localhost (zimbra.averesystems.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GhjS7HK4sv80; Fri, 30 Mar 2012 18:15:20 -0400 (EDT) Received: from riven.arriad.com (fw.arriad.com [10.0.0.16]) by zimbra.averesystems.com (Postfix) with ESMTPSA id C7E22446002; Fri, 30 Mar 2012 18:15:20 -0400 (EDT) From: Andrew Boyer Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Date: Fri, 30 Mar 2012 18:15:10 -0400 Message-Id: To: freebsd-scsi@freebsd.org Mime-Version: 1.0 (Apple Message framework v1084) X-Mailer: Apple Mail (2.1084) Cc: Subject: 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, 30 Mar 2012 22:15:13 -0000 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 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- sys/dev/mfi/mfi_disk.c (revision 233707) +++ sys/dev/mfi/mfi_disk.c (working copy) @@ -274,6 +274,7 @@ hdr =3D bio->bio_driver1; =20 if (bio->bio_flags & BIO_ERROR) { + bio->bio_resid =3D bio->bio_bcount; if (bio->bio_error =3D=3D 0) bio->bio_error =3D EIO; disk_err(bio, "hard error", -1, 1); -------------------------------------------------- Andrew Boyer aboyer@averesystems.com