Re: [Qemu-devel] [PATCH] iscsi: partly avoid iovec linearization in iscsi_aio_writev

2012-11-20 Thread Paolo Bonzini
Il 20/11/2012 16:51, Stefan Hajnoczi ha scritto: > Poalo: Could be > done when merging the patch? > > Reviewed-by: Stefan Hajnoczi Yes. Applying this to scsi-next branch. Paolo

Re: [Qemu-devel] [PATCH] iscsi: partly avoid iovec linearization in iscsi_aio_writev

2012-11-20 Thread Stefan Hajnoczi
On Mon, Nov 19, 2012 at 03:58:31PM +0100, Peter Lieven wrote: > libiscsi expects all write16 data in a linear buffer. If the > iovec only contains one buffer we can skip the linearization > step as well as the additional malloc/free and pass the > buffer directly. > > Reported-by: Ronnie Sahlberg

Re: [Qemu-devel] [PATCH] iscsi: partly avoid iovec linearization in iscsi_aio_writev

2012-11-19 Thread ronnie sahlberg
On Mon, Nov 19, 2012 at 7:18 AM, Paolo Bonzini wrote: > Il 19/11/2012 15:58, Peter Lieven ha scritto: >> >> -/* XXX we should pass the iovec to write16 to avoid the extra copy */ >> -/* this will allow us to get rid of 'buf' completely */ >> size = nb_sectors * BDRV_SECTOR_SIZE; >> -

Re: [Qemu-devel] [PATCH] iscsi: partly avoid iovec linearization in iscsi_aio_writev

2012-11-19 Thread Peter Lieven
Am 19.11.2012 um 16:18 schrieb Paolo Bonzini : > Il 19/11/2012 15:58, Peter Lieven ha scritto: >> >> -/* XXX we should pass the iovec to write16 to avoid the extra copy */ >> -/* this will allow us to get rid of 'buf' completely */ >> size = nb_sectors * BDRV_SECTOR_SIZE; >> -acb

Re: [Qemu-devel] [PATCH] iscsi: partly avoid iovec linearization in iscsi_aio_writev

2012-11-19 Thread Paolo Bonzini
Il 19/11/2012 15:58, Peter Lieven ha scritto: > > -/* XXX we should pass the iovec to write16 to avoid the extra copy */ > -/* this will allow us to get rid of 'buf' completely */ > size = nb_sectors * BDRV_SECTOR_SIZE; > -acb->buf = g_malloc(size); > -qemu_iovec_to_buf(acb->q

[Qemu-devel] [PATCH] iscsi: partly avoid iovec linearization in iscsi_aio_writev

2012-11-19 Thread Peter Lieven
libiscsi expects all write16 data in a linear buffer. If the iovec only contains one buffer we can skip the linearization step as well as the additional malloc/free and pass the buffer directly. Reported-by: Ronnie Sahlberg Signed-off-by: Peter Lieven --- block/iscsi.c | 24 +++--