From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:47313) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvlHp-0001jp-LF for qemu-devel@nongnu.org; Thu, 17 Jan 2013 03:57:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TvlHo-0006Sx-Hc for qemu-devel@nongnu.org; Thu, 17 Jan 2013 03:57:25 -0500 Received: from mx1.redhat.com ([209.132.183.28]:25735) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvlHo-0006Sk-AG for qemu-devel@nongnu.org; Thu, 17 Jan 2013 03:57:24 -0500 Message-ID: <50F7BCF0.1000109@redhat.com> Date: Thu, 17 Jan 2013 09:57:20 +0100 From: Kevin Wolf MIME-Version: 1.0 References: <1358412490-21346-1-git-send-email-mjt@msgid.tls.msk.ru> In-Reply-To: <1358412490-21346-1-git-send-email-mjt@msgid.tls.msk.ru> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] win32-aio: use iov utility functions instead of open-coding them List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Tokarev Cc: pbonzini@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com 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 > --- > 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