From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:42970) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tvl41-0001fz-9F for qemu-devel@nongnu.org; Thu, 17 Jan 2013 03:43:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tvl40-0002V1-1r for qemu-devel@nongnu.org; Thu, 17 Jan 2013 03:43:09 -0500 Message-ID: <50F7B997.2080005@redhat.com> Date: Thu, 17 Jan 2013 09:43:03 +0100 From: Kevin Wolf MIME-Version: 1.0 References: <1358367600-8074-1-git-send-email-kwolf@redhat.com> <1358367600-8074-2-git-send-email-kwolf@redhat.com> <50F7B764.9070702@msgid.tls.msk.ru> In-Reply-To: <50F7B764.9070702@msgid.tls.msk.ru> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [Qemu-stable] [PATCH 1/2] win32-aio: Fix vectored reads 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, qemu-stable@nongnu.org Am 17.01.2013 09:33, schrieb Michael Tokarev: > 17.01.2013 00:19, Kevin Wolf =D0=BF=D0=B8=D1=88=D0=B5=D1=82: >> Copying data in the right direction really helps a lot! >> >> Cc: qemu-stable@nongnu.org >> Signed-off-by: Kevin Wolf >> --- >> 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(QEMUWin32AI= OState *s, >> int i; >> >> for (i =3D 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 +=3D qiov->iov[i].iov_len; >> } >> g_free(waiocb->buf); >=20 > Actually this is just >=20 > 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