From patchwork Thu Jul 28 07:40:34 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frediano Ziglio X-Patchwork-Id: 107191 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 87FC1B6F00 for ; Thu, 28 Jul 2011 17:40:59 +1000 (EST) Received: from localhost ([::1]:46820 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QmLD8-0003Mo-CR for incoming@patchwork.ozlabs.org; Thu, 28 Jul 2011 03:40:50 -0400 Received: from eggs.gnu.org ([140.186.70.92]:44420) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QmLCx-0003B7-Lp for qemu-devel@nongnu.org; Thu, 28 Jul 2011 03:40:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QmLCw-0004Zk-Mm for qemu-devel@nongnu.org; Thu, 28 Jul 2011 03:40:39 -0400 Received: from mail-fx0-f45.google.com ([209.85.161.45]:32869) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QmLCw-0004Z7-C6 for qemu-devel@nongnu.org; Thu, 28 Jul 2011 03:40:38 -0400 Received: by mail-fx0-f45.google.com with SMTP id b27so719180fxb.4 for ; Thu, 28 Jul 2011 00:40:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=ySHYmyubCKc72K7AS3M85RJd4xR0b3JP4I0AwEVXtb8=; b=jti+k44vgaSFEhonWPx/C7LCeOtaz/9DDAuhHPHfBwky1gta9hqvk4+kA86fUHTCz+ v6oIlVzLC6xgx1k+lRRvyFVyXNxmwdZoJDoCods1p0S0EodEAK0LqGqgPz9JSeQNhYxm MWvMjAWieeLN+gcVCfTyokvZ6q2uXgP4MnaWM= Received: by 10.223.9.217 with SMTP id m25mr922463fam.122.1311838837918; Thu, 28 Jul 2011 00:40:37 -0700 (PDT) Received: from obol602.omnitel.it ([87.236.194.191]) by mx.google.com with ESMTPS id y15sm287187fah.35.2011.07.28.00.40.32 (version=SSLv3 cipher=OTHER); Thu, 28 Jul 2011 00:40:37 -0700 (PDT) From: Frediano Ziglio To: Kevin Wolf Date: Thu, 28 Jul 2011 09:40:34 +0200 Message-Id: <1311838841-4853-2-git-send-email-freddy77@gmail.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1311838841-4853-1-git-send-email-freddy77@gmail.com> References: <1311838841-4853-1-git-send-email-freddy77@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.161.45 Cc: qemu-devel@nongnu.org, Frediano Ziglio Subject: [Qemu-devel] [PATCH 1/8] qcow2: removed unused fields X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Frediano Ziglio --- block/qcow2.c | 10 +++------- 1 files changed, 3 insertions(+), 7 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index edc068e..5c454bb 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -381,11 +381,8 @@ typedef struct QCowAIOCB { uint64_t bytes_done; uint64_t cluster_offset; uint8_t *cluster_data; - bool is_write; QEMUIOVector hd_qiov; - QEMUBH *bh; QCowL2Meta l2meta; - QLIST_ENTRY(QCowAIOCB) next_depend; } QCowAIOCB; /* @@ -517,13 +514,12 @@ static int qcow2_aio_read_cb(QCowAIOCB *acb) static QCowAIOCB *qcow2_aio_setup(BlockDriverState *bs, int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, BlockDriverCompletionFunc *cb, - void *opaque, int is_write, QCowAIOCB *acb) + void *opaque, QCowAIOCB *acb) { memset(acb, 0, sizeof(*acb)); acb->common.bs = bs; acb->sector_num = sector_num; acb->qiov = qiov; - acb->is_write = is_write; qemu_iovec_init(&acb->hd_qiov, qiov->niov); @@ -543,7 +539,7 @@ static int qcow2_co_readv(BlockDriverState *bs, int64_t sector_num, QCowAIOCB acb; int ret; - qcow2_aio_setup(bs, sector_num, qiov, nb_sectors, NULL, NULL, 0, &acb); + qcow2_aio_setup(bs, sector_num, qiov, nb_sectors, NULL, NULL, &acb); qemu_co_mutex_lock(&s->lock); do { @@ -658,7 +654,7 @@ static int qcow2_co_writev(BlockDriverState *bs, QCowAIOCB acb; int ret; - qcow2_aio_setup(bs, sector_num, qiov, nb_sectors, NULL, NULL, 1, &acb); + qcow2_aio_setup(bs, sector_num, qiov, nb_sectors, NULL, NULL, &acb); s->cluster_cache_offset = -1; /* disable compressed cache */ qemu_co_mutex_lock(&s->lock);