[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [RFC v6] RBD: Add support readv,writev for rbd
From: |
Jeff Cody |
Subject: |
Re: [Qemu-block] [RFC v6] RBD: Add support readv,writev for rbd |
Date: |
Mon, 20 Feb 2017 23:50:21 -0500 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
On Tue, Feb 21, 2017 at 11:43:36AM +0800, address@hidden wrote:
> From: tianqing <address@hidden>
>
> Rbd can do readv and writev directly, so wo do not need to transform
> iov to buf or vice versa any more.
>
> Signed-off-by: tianqing <address@hidden>
> ---
> block/rbd.c | 79
> ++++++++++++++++++++++++++++++++++++++++++-------------------
> 1 file changed, 54 insertions(+), 25 deletions(-)
>
[...]
> case RBD_AIO_WRITE:
> - r = rbd_aio_write(s->image, off, size, buf, c);
> + if(!LIBRBD_USE_IOVEC)
> + r = rbd_aio_write(s->image, off, size, rcb->buf, c);
> + else
> + r = rbd_aio_writev(s->image, qiov->iov, qiov->niov, off, c);
> break;
> case RBD_AIO_READ:
> - r = rbd_aio_read(s->image, off, size, buf, c);
> + if(!LIBRBD_USE_IOVEC)
> + r = rbd_aio_read(s->image, off, size, rcb->buf, c);
> + else
> + r = rbd_aio_readv(s->image, qiov->iov, qiov->niov, off, c);
These will need to stay #ifdef's since they are new symbols.
> break;
> case RBD_AIO_DISCARD:
> r = rbd_aio_discard_wrapper(s->image, off, size, c);
> @@ -712,14 +740,15 @@ static BlockAIOCB *rbd_start_aio(BlockDriverState *bs,
> if (r < 0) {
> goto failed_completion;
> }
> -
> return &acb->common;
>
> failed_completion:
> rbd_aio_release(c);
> failed:
> g_free(rcb);
> - qemu_vfree(acb->bounce);
> + if(!LIBRBD_USE_IOVEC)
> + qemu_vfree(acb->bounce);
> +
> qemu_aio_unref(acb);
> return NULL;
> }
> --
> 2.10.2
>
(Also code formatting as pointed out by patchew)
- [Qemu-block] [RFC v6] RBD: Add support readv,writev for rbd, jazeltq, 2017/02/20
- [Qemu-block] [RFC v6] RBD: Add support readv,writev for rbd, jazeltq, 2017/02/21
- Re: [Qemu-block] [RFC v6] RBD: Add support readv,writev for rbd, Jaze Lee, 2017/02/21
- Re: [Qemu-block] [RFC v6] RBD: Add support readv,writev for rbd, Stefan Hajnoczi, 2017/02/21
- Re: [Qemu-block] [RFC v6] RBD: Add support readv,writev for rbd, Jaze Lee, 2017/02/22
- Re: [Qemu-block] [RFC v6] RBD: Add support readv,writev for rbd, Kevin Wolf, 2017/02/22
- Message not available
- Message not available
- Re: [Qemu-block] [RFC v6] RBD: Add support readv,writev for rbd, Jaze Lee, 2017/02/22
Re: [Qemu-block] [RFC v6] RBD: Add support readv,writev for rbd, Jeff Cody, 2017/02/23