From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:56308) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S08vQ-0005vb-9s for qemu-devel@nongnu.org; Wed, 22 Feb 2012 04:55:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S08vP-0001Si-FM for qemu-devel@nongnu.org; Wed, 22 Feb 2012 04:55:52 -0500 Received: from cantor2.suse.de ([195.135.220.15]:32946 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S08vP-0001SR-7d for qemu-devel@nongnu.org; Wed, 22 Feb 2012 04:55:51 -0500 Message-ID: <4F44BBA5.30402@suse.de> Date: Wed, 22 Feb 2012 10:55:49 +0100 From: Hannes Reinecke MIME-Version: 1.0 References: <1329706897-30476-1-git-send-email-david@gibson.dropbear.id.au> <8A3EA298-2301-454F-81AE-301E1D898F50@suse.de> <4F435747.2020304@redhat.com> <4F435F2D.3010007@redhat.com> <20120222011154.GN16796@truffala.fritz.box> <4F44BB40.8070703@suse.de> In-Reply-To: <4F44BB40.8070703@suse.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] Use DMADirection type for dma_bdrv_io List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?ISO-8859-1?Q?Andreas_F=E4rber?= Cc: Kevin Wolf , Paolo Bonzini , qemu-devel@nongnu.org, Alexander Graf , David Gibson On 02/22/2012 10:54 AM, Andreas F=E4rber wrote: > Am 22.02.2012 02:11, schrieb David Gibson: >> On Tue, Feb 21, 2012 at 10:09:01AM +0100, Kevin Wolf wrote: >>> Am 21.02.2012 09:35, schrieb Paolo Bonzini: >>>> On 02/20/2012 11:50 AM, Alexander Graf wrote: >>>>>>> DMAAIOCB *dbs =3D qemu_aio_get(&dma_aio_pool, bs, cb, opaque)= ; >>>>>>> >>>>>>> - trace_dma_bdrv_io(dbs, bs, sector_num, to_dev); >>>>>>> + trace_dma_bdrv_io(dbs, bs, sector_num, dir); >>>>> Was the trace wrong before or is it now? I don't see its definition= changed anywhere. >>>> >>>> Not sure what you mean. :) >>> >>> trace-events: >>> >>> dma_bdrv_io(void *dbs, void *bs, int64_t sector_num, bool to_dev) >>> "dbs=3D%p bs=3D%p sector_num=3D%" PRId64 " to_dev=3D%d" >> >> Ah, damnit. Didn't find that file. I'll resubmit with trace-events >> updated too. >> >>> to_dev is declared bool here, and it should also be renamed to dir (t= he >>> unfortunate thing about DMADirection is that it swaps 0 and 1 compare= d >>> to bool to_dev... We need to check carefully that all occurrences hav= e >>> been caught.) >> >> Yeah. And even more unfortunate that afaict there's no way to make >> gcc warn on enum<->bool conversions. Still there are only about 4 >> callers of dma_bdrv_io() - nearly everything uses the >> dma_bdrv_{read,write}() wrappers - so I'm confident I got them all. >=20 > Re all occurrences: megasas might be affected by such a change, too > (patch on the list). >=20 Nope. megasas is using the scsi interface for reading/writing, so it should be insulated against this kind of change. 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: J. Hawn, J. Guild, F. Imend=F6rffer, HRB 16746 (AG N=FCrnberg)