From: Laurent Vivier Subject: Re: [PATCH] qemu: use statically allocate 512 byte buffer in the stack for sector in bdrv_commit Date: Mon, 07 Jan 2008 16:16:44 +0100 Message-ID: <1199719004.23380.22.camel@frecb07144> References: <20080104071138.GB9285@tapir> <4781F08E.8060407@qumranet.com> <1199701358.19008.1.camel@frecb07144> <4782034C.4000805@qumranet.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1214962013==" Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, Carlo Marcelo Arenas Belon To: Avi Kivity Return-path: In-Reply-To: <4782034C.4000805-atKUWr5tajBWk0Htik3J/w@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org --===============1214962013== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-KjF7jVY1ROZ6ZZ5IwpLZ" --=-KjF7jVY1ROZ6ZZ5IwpLZ Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Le lundi 07 janvier 2008 =C3=A0 12:47 +0200, Avi Kivity a =C3=A9crit : > Laurent Vivier wrote: > > Le lundi 07 janvier 2008 =C3=A0 11:27 +0200, Avi Kivity a =C3=A9crit : > > =20 > >> Carlo Marcelo Arenas Belon wrote: > >> =20 > >>> revert a merge conflict from 075da586c92f09bd9a7401f1e80d72fde27c173 = that > >>> redefined sector as an array of pointers to char, instead of a static= ally > >>> allocated buffer of chars, that was triggering the following warnings= : > >>> > >>> block.c: In function `bdrv_commit': > >>> block.c:480: warning: passing arg 3 of `bdrv_read' from incompatible = pointer type > >>> block.c:484: warning: passing arg 3 of `bdrv_write' from incompatible= pointer type > >>> > >>> Signed-off-by: Carlo Marcelo Arenas Belon > >>> =20 > >>> =20 > >> Doesn't the cache=3Doff option warrant an allocation here to ensure=20 > >> alignment (or perhaps a 1K stack buffer with runtime adjustment)? > >> =20 > > > > You're right, a good patch should be something like this (it is not > > tested or even compiled) : > > =20 >=20 > Looks good, but patch is corrupted by mail client. What I'm wondering now is: is it really useful to have "cache=3Doff" and "snapshot=3Don" at the same time ? If not, the patch of Carlo is good, otherwise there is more modifications to do (in other parts of qemu). Regards, Laurent --=20 ----------------- Laurent.Vivier-6ktuUTfB/bM@public.gmane.org ------------------ "La perfection est atteinte non quand il ne reste rien =C3=A0 ajouter mais quand il ne reste rien =C3=A0 enlever." Saint Exup=C3=A9ry --=-KjF7jVY1ROZ6ZZ5IwpLZ 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) iD8DBQBHgkJc9Kffa9pFVzwRAip0AKCo+/0qZYCV0ivkIsUHoddU65Xn2wCgi8BC 3SaIrOJTH4wpc4ca/BjaO40= =rvEv -----END PGP SIGNATURE----- --=-KjF7jVY1ROZ6ZZ5IwpLZ-- --===============1214962013== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ --===============1214962013== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ kvm-devel mailing list kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/kvm-devel --===============1214962013==--