From patchwork Tue Aug 9 07:46:41 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frediano Ziglio X-Patchwork-Id: 109160 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 790BAB6F7F for ; Tue, 9 Aug 2011 18:12:58 +1000 (EST) Received: from localhost ([::1]:52005 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qqh2I-000685-Da for incoming@patchwork.ozlabs.org; Tue, 09 Aug 2011 03:47:38 -0400 Received: from eggs.gnu.org ([140.186.70.92]:40143) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qqh1n-0004EN-57 for qemu-devel@nongnu.org; Tue, 09 Aug 2011 03:47:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qqh1g-0006xG-Ns for qemu-devel@nongnu.org; Tue, 09 Aug 2011 03:47:01 -0400 Received: from mail-ew0-f45.google.com ([209.85.215.45]:37438) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qqh1g-0006lw-Gc for qemu-devel@nongnu.org; Tue, 09 Aug 2011 03:47:00 -0400 Received: by mail-ew0-f45.google.com with SMTP id 24so2618658ewy.4 for ; Tue, 09 Aug 2011 00:47:00 -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=rv9jDKaaUY/iKXSSinnM+a/cYLWd7hlDyikCJToMwRK3hkTHxvj7PuKo8w/y+r/D4x 7gdfACpD0moFhd9J8l4xrfNqdfsTF9es9Dcxu3w29tbWHe7NNUsdEoddKZTOEMd0N3kl JMTblyKqdRqoyIoUHhHV1zFh1BjnXtRF+v+BE= Received: by 10.14.5.66 with SMTP id 42mr1788157eek.181.1312876019728; Tue, 09 Aug 2011 00:46:59 -0700 (PDT) Received: from obol602.omnitel.it ([206.217.137.183]) by mx.google.com with ESMTPS id p49sm2857459eef.58.2011.08.09.00.46.56 (version=SSLv3 cipher=OTHER); Tue, 09 Aug 2011 00:46:59 -0700 (PDT) From: Frediano Ziglio To: kwolf@redhat.com Date: Tue, 9 Aug 2011 09:46:41 +0200 Message-Id: <1312876010-15361-7-git-send-email-freddy77@gmail.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1312876010-15361-1-git-send-email-freddy77@gmail.com> References: <1312876010-15361-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.215.45 Cc: qemu-devel@nongnu.org, Frediano Ziglio Subject: [Qemu-devel] [PATCH v2 06/15] 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);