From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J0fpD-0004Je-5q for qemu-devel@nongnu.org; Fri, 07 Dec 2007 11:13:15 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J0fpB-0004IH-S2 for qemu-devel@nongnu.org; Fri, 07 Dec 2007 11:13:14 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J0fpB-0004I5-Oe for qemu-devel@nongnu.org; Fri, 07 Dec 2007 11:13:13 -0500 Received: from ecfrec.frec.bull.fr ([129.183.4.8]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1J0fpA-0003IN-Ln for qemu-devel@nongnu.org; Fri, 07 Dec 2007 11:13:13 -0500 Subject: Re: [Qemu-devel] [PATCH 2/2] Real SCSI device passthrough (v3) From: Laurent Vivier In-Reply-To: <47596E0C.6050602@codemonkey.ws> References: <11970374183207@bull.net> <200712071522.54416.paul@codesourcery.com> <1197041399.4521.2.camel@frecb07144> <47596E0C.6050602@codemonkey.ws> Date: Fri, 07 Dec 2007 17:13:03 +0100 Message-Id: <1197043983.4521.8.camel@frecb07144> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-gFpk+26OcdN6qPJKqzoc" Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Paul Brook --=-gFpk+26OcdN6qPJKqzoc Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Le vendredi 07 d=C3=A9cembre 2007 =C3=A0 10:00 -0600, Anthony Liguori a =C3= =A9crit : > Laurent Vivier wrote: > > Le vendredi 07 d=C3=A9cembre 2007 =C3=A0 15:22 +0000, Paul Brook a =C3= =A9crit : > > =20 > >> On Friday 07 December 2007, Laurent Vivier wrote: > >> =20 > >>> - acb->aiocb.aio_nbytes =3D nb_sectors * 512; > >>> + if (nb_sectors < 0) > >>> + acb->aiocb.aio_nbytes =3D -nb_sectors; > >>> + else > >>> + acb->aiocb.aio_nbytes =3D nb_sectors * 512; > >>> =20 > >> Ugly hacks like this need at least a decent comment. > >> =20 > > > > Yes, you're right but I'm always wondering if it is the good way to do > > what I want: read a number of bytes instead of a number of sectors. > > Perhaps I should define a new function in the qemu AIO interface ? > > =20 >=20 > I think the crux of the problem is that you're using the BlockDriver API=20 > for something that isn't actually a block driver. Yes, I know, but I don't want to rewrite all block-raw.c just to change the granularity of the I/O access. It is the best solution I found, if you have some better ideas (and I know you have lot of good ideas), I take them. Regards, Laurent --=20 ------------- Laurent.Vivier@bull.net -------------- "Any sufficiently advanced technology is indistinguishable from magic." - Arthur C. Clarke --=-gFpk+26OcdN6qPJKqzoc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Ceci est une partie de message =?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?= -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQBHWXEP9Kffa9pFVzwRAtkLAJ4vBY6FfnDINpkTpShDv6pb6cMtIQCguxva TIkgz5Jzakf6BiFpcmYfCJc= =5odC -----END PGP SIGNATURE----- --=-gFpk+26OcdN6qPJKqzoc--