qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [Qemu-stable] [PATCH 1/2] win32-aio: Fix vectored reads


From: Kevin Wolf
Subject: Re: [Qemu-devel] [Qemu-stable] [PATCH 1/2] win32-aio: Fix vectored reads
Date: Thu, 17 Jan 2013 09:43:03 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120605 Thunderbird/13.0

Am 17.01.2013 09:33, schrieb Michael Tokarev:
> 17.01.2013 00:19, Kevin Wolf пишет:
>> Copying data in the right direction really helps a lot!
>>
>> Cc: address@hidden
>> Signed-off-by: Kevin Wolf <address@hidden>
>> ---
>>   block/win32-aio.c |    2 +-
>>   1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/block/win32-aio.c b/block/win32-aio.c
>> index 46a5db7..53b82e6 100644
>> --- a/block/win32-aio.c
>> +++ b/block/win32-aio.c
>> @@ -84,7 +84,7 @@ static void win32_aio_process_completion(QEMUWin32AIOState 
>> *s,
>>               int i;
>>
>>               for (i = 0; i < qiov->niov; ++i) {
>> -                memcpy(p, qiov->iov[i].iov_base, qiov->iov[i].iov_len);
>> +                memcpy(qiov->iov[i].iov_base, p, qiov->iov[i].iov_len);
>>                   p += qiov->iov[i].iov_len;
>>               }
>>               g_free(waiocb->buf);
> 
> Actually this is just
> 
>     iov_from_buf(qiov->iov, qiov->niov, 0, waiocb->buf, -1);

True. Let's keep fix and cleanup separate, though. Feel free to send a
cleanup patch on top of this.

By the way, I think qiov->size instead of -1 would be nicer.

> Or is it iov_to_buf() ? :)

The corrected version is from.

Kevin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]