From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=44005 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PMgNr-0001f4-CB for qemu-devel@nongnu.org; Sun, 28 Nov 2010 07:29:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PMgNp-00034G-Dk for qemu-devel@nongnu.org; Sun, 28 Nov 2010 07:29:35 -0500 Received: from mx1.redhat.com ([209.132.183.28]:17743) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PMgNp-00034B-6X for qemu-devel@nongnu.org; Sun, 28 Nov 2010 07:29:33 -0500 Date: Sun, 28 Nov 2010 14:28:52 +0200 From: "Michael S. Tsirkin" 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-Disposition: inline In-Reply-To: Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] Re: [PATCH 13/21] dma-helpers: replace bdrv_aio_writev() with bdrv_aio_writev_proxy(). List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Yoshiaki Tamura Cc: Kevin Wolf , aliguori@us.ibm.com, dlaor@redhat.com, ananth@in.ibm.com, kvm@vger.kernel.org, ohmura.kei@lab.ntt.co.jp, mtosatti@redhat.com, qemu-devel@nongnu.org, vatsa@linux.vnet.ibm.com, avi@redhat.com, psuriset@linux.vnet.ibm.com, stefanha@linux.vnet.ibm.com 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_n= um, &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->se= ctor_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->sector_= 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.html > > -- > > 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.html > >