qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] win32-aio: use iov utility functions instead of


From: Kevin Wolf
Subject: Re: [Qemu-devel] [PATCH] win32-aio: use iov utility functions instead of open-coding them
Date: Thu, 17 Jan 2013 09:57:20 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120605 Thunderbird/13.0

Am 17.01.2013 09:48, schrieb Michael Tokarev:
> We have iov_from_buf() and iov_to_buf(), use them instead of
> open-coding these in block/win32-aio.c
> 
> Signed-Off-By: Michael Tokarev <address@hidden>
> ---
>  block/win32-aio.c |   18 +++---------------
>  1 file changed, 3 insertions(+), 15 deletions(-)
> 
> diff --git a/block/win32-aio.c b/block/win32-aio.c
> index 0383370..773d3f4 100644
> --- a/block/win32-aio.c
> +++ b/block/win32-aio.c
> @@ -79,14 +79,8 @@ static void win32_aio_process_completion(QEMUWin32AIOState 
> *s,
>  
>      if (!waiocb->is_linear) {
>          if (ret == 0 && waiocb->is_read) {
> -            QEMUIOVector *qiov = waiocb->qiov;
> -            char *p = waiocb->buf;
> -            int i;
> -
> -            for (i = 0; i < qiov->niov; ++i) {
> -                memcpy(p, qiov->iov[i].iov_base, qiov->iov[i].iov_len);

I said on top of my patch for a reason: Now this looks like an innocent
refactoring patch, while in fact it is a hidden bug fix. Even the commit
message doesn't mention this.

Though I guess Stefan can apply my patch first and resolve the conflict
with this patch, then the result should be right.

Kevin



reply via email to

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