[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCHv3 3/9] allow qemu_iovec_from_buffer() to specify
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-devel] [PATCHv3 3/9] allow qemu_iovec_from_buffer() to specify offset from which to start copying |
Date: |
Tue, 13 Mar 2012 12:10:25 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120209 Thunderbird/10.0.1 |
Am 12.03.2012 20:14, schrieb Michael Tokarev:
> Similar to
> qemu_iovec_memset(QEMUIOVector *qiov, size_t offset,
> int c, size_t bytes);
> the new prototype is:
> qemu_iovec_from_buf(QEMUIOVector *qiov, size_t offset,
> const void *buf, size_t bytes);
>
> The processing starts at offset bytes within qiov.
>
> This way, we may copy a bounce buffer directly to
> a middle of qiov.
>
> This is exactly the same function as iov_from_buf() from
> iov.c, so use the existing implementation and rename it
> to qemu_iovec_from_buf() to be shorter and to match the
> utility function.
>
> As with utility implementation, we now assert that the
> offset is inside actual iovec. Nothing changed for
> current callers, because `offset' parameter is new.
>
> While at it, stop using "bounce-qiov" in block/qcow2.c
> and copy decrypted data directly from cluster_data
> instead of recreating a temp qiov for doing that
> (Cc'ing kwolf for this change).
Looks good to me.
Kevin
- [Qemu-devel] [PATCHv3 0/9] cleanup/consolidate some iovec functions, Michael Tokarev, 2012/03/12
- [Qemu-devel] [PATCHv3 2/9] consolidate qemu_iovec_memset{, _skip}() into single function and use existing iov_memset(), Michael Tokarev, 2012/03/12
- [Qemu-devel] [PATCHv3 1/9] refresh iov_* functions, Michael Tokarev, 2012/03/12
- [Qemu-devel] [PATCHv3 4/9] consolidate qemu_iovec_copy() and qemu_iovec_concat() and make them consistent, Michael Tokarev, 2012/03/12
- [Qemu-devel] [PATCHv3 5/9] change qemu_iovec_to_buf() to match other to, from_buf functions, Michael Tokarev, 2012/03/12
- [Qemu-devel] [PATCHv3 8/9] cleanup qemu_co_sendv(), qemu_co_recvv() and friends, Michael Tokarev, 2012/03/12
- [Qemu-devel] [PATCHv3 7/9] export qemu_sendv_recvv() and use it in qemu_sendv() and qemu_recvv(), Michael Tokarev, 2012/03/12
- [Qemu-devel] [PATCHv3 3/9] allow qemu_iovec_from_buffer() to specify offset from which to start copying, Michael Tokarev, 2012/03/12
- Re: [Qemu-devel] [PATCHv3 3/9] allow qemu_iovec_from_buffer() to specify offset from which to start copying,
Kevin Wolf <=
- [Qemu-devel] [PATCHv3 6/9] change prototypes of qemu_sendv() and qemu_recvv(), Michael Tokarev, 2012/03/12
- [Qemu-devel] [PATCHv3 9/9] rewrite and comment qemu_sendv_recvv(), Michael Tokarev, 2012/03/12
- Re: [Qemu-devel] [PATCHv3 0/9] cleanup/consolidate some iovec functions, Michael Tokarev, 2012/03/13