[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCHv4 05/11] allow qemu_iovec_from_buffer() to speci
From: |
Michael Tokarev |
Subject: |
Re: [Qemu-devel] [PATCHv4 05/11] allow qemu_iovec_from_buffer() to specify offset from which to start copying |
Date: |
Fri, 16 Mar 2012 23:35:10 +0400 |
User-agent: |
Mozilla/5.0 (X11; Linux i686 on x86_64; rv:8.0) Gecko/20120216 Icedove/8.0 |
On 16.03.2012 20:19, Anthony Liguori wrote:
> On 03/15/2012 04:00 PM, Michael Tokarev wrote:
>> 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).
>>
>> Signed-off-by: Michael Tokarev<address@hidden>
>> Cc: Kevin Wolf<address@hidden>
>
> Kevin, please Ack.
Kevin already reviewed the (previous version which hasn't
changed in the block layer) patch:
http://thread.gmane.org/gmane.comp.emulators.qemu/140817/focus=141013
but since he didn't include any Signed-off-by/Reviewed-by I
left it as-is.
Thanks,
/mjt
- Re: [Qemu-devel] [PATCHv4 04/11] consolidate qemu_iovec_memset{, _skip}() into single function and use existing iov_memset(), (continued)
- [Qemu-devel] [PATCHv4 10/11] cleanup qemu_co_sendv(), qemu_co_recvv() and friends, Michael Tokarev, 2012/03/15
- [Qemu-devel] [PATCHv4 06/11] consolidate qemu_iovec_copy() and qemu_iovec_concat() and make them consistent, Michael Tokarev, 2012/03/15
- [Qemu-devel] [PATCHv4 11/11] rewrite iov_send_recv() and move it to iov.c, Michael Tokarev, 2012/03/15
- [Qemu-devel] [PATCHv4 07/11] change qemu_iovec_to_buf() to match other to, from_buf functions, Michael Tokarev, 2012/03/15
- [Qemu-devel] [PATCHv4 05/11] allow qemu_iovec_from_buffer() to specify offset from which to start copying, Michael Tokarev, 2012/03/15
- [Qemu-devel] [PATCHv4 02/11] change iov_* function prototypes to be more appropriate, Michael Tokarev, 2012/03/15
- [Qemu-devel] [PATCHv4 03/11] rewrite iov_* functions, Michael Tokarev, 2012/03/15
- Re: [Qemu-devel] [PATCHv4 00/11] cleanup/consolidate iovec functions, Paolo Bonzini, 2012/03/16