From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NDgc8-00076T-9x for qemu-devel@nongnu.org; Thu, 26 Nov 2009 10:50:36 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NDgc3-0006zy-I7 for qemu-devel@nongnu.org; Thu, 26 Nov 2009 10:50:35 -0500 Received: from [199.232.76.173] (port=55565 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NDgc2-0006zb-PW for qemu-devel@nongnu.org; Thu, 26 Nov 2009 10:50:30 -0500 Received: from cantor.suse.de ([195.135.220.2]:41810 helo=mx1.suse.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NDgc1-0001MN-Iz for qemu-devel@nongnu.org; Thu, 26 Nov 2009 10:50:30 -0500 Message-ID: <4B0EA3C2.2020007@suse.de> Date: Thu, 26 Nov 2009 16:50:26 +0100 From: Hannes Reinecke MIME-Version: 1.0 Subject: Re: [Qemu-devel] [sneak preview] major scsi overhaul References: <4AF4ACA5.2090701@redhat.com> <200911161853.34668.paul@codesourcery.com> <4B0BCAA1.3090400@redhat.com> <200911241351.03650.paul@codesourcery.com> <4B0D5D36.6080100@redhat.com> <4B0E2EC8.7040309@suse.de> <4B0E3B90.5080001@redhat.com> <4B0E5EFD.6060701@suse.de> <4B0E60AF.9000508@redhat.com> <4B0E6496.1060203@suse.de> <4B0E8EF6.2080106@redhat.com> <4B0E9036.2070400@suse.de> <4B0E92B1.10903@redhat.com> In-Reply-To: <4B0E92B1.10903@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: Paul Brook , qemu-devel@nongnu.org Gerd Hoffmann wrote: > On 11/26/09 15:27, Hannes Reinecke wrote: >> Gerd Hoffmann wrote: >>> sd_done() tries to figure how many sectors it actually got for seriou= s >>> errors. I don't feel signaling "medium error" for the first sector >>> behind our limit just because we'd like to have smaller requests. >=20 >> scsi_end_request is being called with the number of bytes _actually >> processed_, >> which might be less than the number of bytes requested. >> And the remainder will be retried by the upper layers. >=20 > The "number of bytes _actually processed_" must come from somewhere. An= d > that somewhere is sd_done() in case of scsi-disks. See my point now? >=20 Ah. Now. I concur. So indeed, this approach would only work if we signal some sense code back to the host. I, OTOH, don't have any qualms with returning HARDWARE_ERROR, 0x26/0x08(TOO MANY SEGMENT DESCRIPTORS) resp 0x26h/0x0B (INLINE DATA LENG= TH EXCEEDED). Feels only fair to notify the guest it has done something wrong. The alternative would be to split the I/O into smaller sections. But this really feels a bit like an overkill. Cheers, Hannes --=20 Dr. Hannes Reinecke zSeries & Storage hare@suse.de +49 911 74053 688 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg GF: Markus Rex, HRB 16746 (AG N=FCrnberg)