Re: [Qemu-devel] [PATCH 19/22] dataplane: use the QEMU block layer for I/O

2014-05-05 Thread Stefan Hajnoczi
On Sun, May 04, 2014 at 07:51:40PM +0800, Fam Zheng wrote: > On Thu, 05/01 16:54, Stefan Hajnoczi wrote: > > +VirtIOBlockRequest *req = g_slice_new(VirtIOBlockRequest); > > Could be g_slice_new0, > > > +QEMUIOVector *qiov; > > +int nb_sectors; > > + > > +/* Fill in virtio block me

Re: [Qemu-devel] [PATCH 19/22] dataplane: use the QEMU block layer for I/O

2014-05-04 Thread Fam Zheng
On Thu, 05/01 16:54, Stefan Hajnoczi wrote: > @@ -152,51 +132,53 @@ static void do_get_id_cmd(VirtIOBlockDataPlane *s, > complete_request_early(s, elem, inhdr, VIRTIO_BLK_S_OK); > } > > -static int do_rdwr_cmd(VirtIOBlockDataPlane *s, bool read, > - struct iovec *iov,

[Qemu-devel] [PATCH 19/22] dataplane: use the QEMU block layer for I/O

2014-05-01 Thread Stefan Hajnoczi
Stop using a custom Linux AIO request queue from ioq.h and instead use the QEMU block layer for I/O. This patch adjusts the VirtIOBlockRequest struct with fields needed for bdrv_aio_readv()/bdrv_aio_writev(). ioq.h used struct iovec and struct iocb, which we don't need directly anymore. Modify d