From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: Re: [PATCH 13/21] dma-helpers: replace bdrv_aio_writev() with bdrv_aio_writev_proxy(). Date: Sun, 28 Nov 2010 14:28:52 +0200 Message-ID: <20101128122852.GA12732@redhat.com> References: <1290665220-26478-1-git-send-email-tamura.yoshiaki@lab.ntt.co.jp> <1290665220-26478-14-git-send-email-tamura.yoshiaki@lab.ntt.co.jp> <20101128093357.GC3342@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Kevin Wolf , kvm@vger.kernel.org, qemu-devel@nongnu.org, avi@redhat.com, anthony@codemonkey.ws, aliguori@us.ibm.com, mtosatti@redhat.com, dlaor@redhat.com, ananth@in.ibm.com, psuriset@linux.vnet.ibm.com, vatsa@linux.vnet.ibm.com, stefanha@linux.vnet.ibm.com, ohmura.kei@lab.ntt.co.jp To: Yoshiaki Tamura Return-path: Received: from mx1.redhat.com ([209.132.183.28]:53290 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752776Ab0K1M3e (ORCPT ); Sun, 28 Nov 2010 07:29:34 -0500 Content-Disposition: inline In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On Sun, Nov 28, 2010 at 08:55:28PM +0900, Yoshiaki Tamura wrote: > 2010/11/28 Michael S. Tsirkin : > > On Thu, Nov 25, 2010 at 03:06:52PM +0900, Yoshiaki Tamura wrote: > >> Replace bdrv_aio_writev() with bdrv_aio_writev_proxy() to let > >> event-tap capture events from dma-helpers. > >> > >> Signed-off-by: Yoshiaki Tamura > > > > Same comment as -net here: it's not clear when should > > a device use bdrv_aio_writev_proxy and when bdrv_aio_writev. > > If all devices should just use _proxy, let's > > just make bdrv_aio_writev DTRT instead. >=20 > Same as I replied to the net layer question. However, I had > troubles with inserting event-tap functions into block.c before. > block.c gets linked with utils like qemu-img, but they don't get > linked with emulators code which event-tap uses in it. So I want > to avoid linking block and event-tap for utils, but I guess we > don't want to use ifdefs for this. I'm wondering how I can solve > this problem cleanly. Add stubs same as we have for other functions. > Kevin, do you have suggestions here? >=20 > Yoshi >=20 > > > >> --- > >> =A0dma-helpers.c | =A0 =A04 ++-- > >> =A01 files changed, 2 insertions(+), 2 deletions(-) > >> > >> diff --git a/dma-helpers.c b/dma-helpers.c > >> index 712ed89..8ab2c26 100644 > >> --- a/dma-helpers.c > >> +++ b/dma-helpers.c > >> @@ -117,8 +117,8 @@ static void dma_bdrv_cb(void *opaque, int ret) > >> =A0 =A0 =A0} > >> > >> =A0 =A0 =A0if (dbs->is_write) { > >> - =A0 =A0 =A0 =A0dbs->acb =3D bdrv_aio_writev(dbs->bs, dbs->sector= _num, &dbs->iov, > >> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 dbs->iov.size / 512, dma_bdrv_cb, dbs); > >> + =A0 =A0 =A0 =A0dbs->acb =3D bdrv_aio_writev_proxy(dbs->bs, dbs->= sector_num, &dbs->iov, > >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 dbs->iov.size / 512, dma_bdrv_cb, dbs); > >> =A0 =A0 =A0} else { > >> =A0 =A0 =A0 =A0 =A0dbs->acb =3D bdrv_aio_readv(dbs->bs, dbs->secto= r_num, &dbs->iov, > >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0dbs->iov.size / 512, dma_bdrv_cb, dbs); > >> -- > >> 1.7.1.2 > >> > >> -- > >> To unsubscribe from this list: send the line "unsubscribe kvm" in > >> the body of a message to majordomo@vger.kernel.org > >> More majordomo info at =A0http://vger.kernel.org/majordomo-info.ht= ml > > -- > > To unsubscribe from this list: send the line "unsubscribe kvm" in > > the body of a message to majordomo@vger.kernel.org > > More majordomo info at =A0http://vger.kernel.org/majordomo-info.htm= l > >