Received: from [140.186.70.92] (port=59457 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PVYHN-0007Hk-G7 for qemu-devel@nongnu.org; Wed, 22 Dec 2010 18:39:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PVYHL-0001yn-Vo for qemu-devel@nongnu.org; Wed, 22 Dec 2010 18:39:33 -0500 Received: from cantor2.suse.de ([195.135.220.15]:57018 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PVYHL-0001yd-J1 for qemu-devel@nongnu.org; Wed, 22 Dec 2010 18:39:31 -0500 Subject: Re: [Qemu-devel] scsi-generic and max request size Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset=us-ascii From: Alexander Graf In-Reply-To: <1293060903.16694.789.camel@pasglop> Date: Thu, 23 Dec 2010 00:39:28 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <38550122-4CCE-4F97-BCA3-4AA37230D623@suse.de> References: <1292901946.16694.688.camel@pasglop> <1292903541.16694.695.camel@pasglop> <4D1068E3.4080000@suse.de> <1292969126.16694.755.camel@pasglop> <4D12032E.6040602@suse.de> <1293055150.16694.779.camel@pasglop> <04B7FA87-1141-4B62-A7C2-3D1970041980@suse.de> <1293060903.16694.789.camel@pasglop> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Benjamin Herrenschmidt Cc: Kevin Wolf , Christoph Hellwig , Hannes Reinecke , ronnie sahlberg , qemu-devel On 23.12.2010, at 00:35, Benjamin Herrenschmidt wrote: > On Thu, 2010-12-23 at 00:23 +0100, Alexander Graf wrote: >>> The non working compat ioctl is one, the fact that "sg" has >>> no /sys/class/block (or /sys/block) entries is another, etc... Ie, >> we >>> are faced with a problem with Linux not exposing those informations >> in >>> an easy to retrieve way, and no proper cross-platform way to obtain >>> those informations neither. >>=20 >> Why would you care about cross-platform here? Not saying I fully >> understand what information exactly you're lacking. But it's either >> SG_IO max request size in which case you don't need any equivalent on >> other platforms, as it's not available anywhere else. Or it's >> something else in which case you can just set it to some "safe" small >> default value and call it a day :). >=20 > Well, do we support something like scsi-generic on windows or BSD > hosts ? dunno.. .just asking :-) They -have- mechanisms (at least > windows do) to pass SCSI requests down the stack. In that case, = they'll > have similar limitations (at the very least the max request size). >=20 > So we'd want some way to expose that... but if scsi-generic today is > linux only, then I can try to add linux-isms in there as a stop-gap to > try to at least retreive the max req. size which is the main issue for > me right now... at least until I start trying to have the SG_IO > read/write directly into guest memory without bouncing :-) At that > point, the SG limits might become trouble as well. This all belongs in the block layer. If you create a call back function = or property in the block struct, windows can implement its own limits = when someone sits down to implement SG_IO on Windows. Alex