From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:38729) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QjWQe-0000hT-Vy for qemu-devel@nongnu.org; Wed, 20 Jul 2011 09:03:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QjWQc-0003vA-Tv for qemu-devel@nongnu.org; Wed, 20 Jul 2011 09:03:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:1844) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QjWQc-0003us-C3 for qemu-devel@nongnu.org; Wed, 20 Jul 2011 09:03:06 -0400 Message-ID: <4E26D2B6.6050006@redhat.com> Date: Wed, 20 Jul 2011 15:05:58 +0200 From: Kevin Wolf MIME-Version: 1.0 References: <1311148624-5640-1-git-send-email-freddy77@gmail.com> <1311148624-5640-6-git-send-email-freddy77@gmail.com> In-Reply-To: <1311148624-5640-6-git-send-email-freddy77@gmail.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH 5/5] qemu_aio_get used to clear all allocated buffer List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Frediano Ziglio Cc: qemu-devel@nongnu.org Am 20.07.2011 09:57, schrieb Frediano Ziglio: > Signed-off-by: Frediano Ziglio > --- > block/qcow.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/block/qcow.c b/block/qcow.c > index 007fb57..8fd1ee5 100644 > --- a/block/qcow.c > +++ b/block/qcow.c > @@ -499,7 +499,6 @@ static QCowAIOCB *qcow_aio_setup(BlockDriverState *bs, > int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, > int is_write, QCowAIOCB *acb) > { > - memset(acb, 0, sizeof(*acb)); > acb->bs = bs; > acb->sector_num = sector_num; > acb->qiov = qiov; > @@ -509,6 +508,7 @@ static QCowAIOCB *qcow_aio_setup(BlockDriverState *bs, > if (is_write) > qemu_iovec_to_buffer(qiov, acb->buf); > } else { > + acb->orig_buf = NULL; > acb->buf = (uint8_t *)qiov->iov->iov_base; > } > acb->nb_sectors = nb_sectors; What does this fix? Removing the memset looks like changing code for no obvious reason. Is there any state in acb that must survive qcow_aio_setup? Kevin