qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: pbonzini@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com
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	[thread overview]
Message-ID: <50F7BCF0.1000109@redhat.com> (raw)
In-Reply-To: <1358412490-21346-1-git-send-email-mjt@msgid.tls.msk.ru>

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 <mjt@tls.msk.ru>
> ---
>  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	other threads:[~2013-01-17  8:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-17  8:48 [Qemu-devel] [PATCH] win32-aio: use iov utility functions instead of open-coding them Michael Tokarev
2013-01-17  8:57 ` Kevin Wolf [this message]
2013-01-17  8:59   ` Michael Tokarev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50F7BCF0.1000109@redhat.com \
    --to=kwolf@redhat.com \
    --cc=mjt@tls.msk.ru \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).