From patchwork Mon Aug 29 14:53:35 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Wolf X-Patchwork-Id: 112101 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 CE3BBB6F8C for ; Tue, 30 Aug 2011 02:03:49 +1000 (EST) Received: from localhost ([::1]:50554 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qy3CQ-0002JK-1S for incoming@patchwork.ozlabs.org; Mon, 29 Aug 2011 10:52:30 -0400 Received: from eggs.gnu.org ([140.186.70.92]:39264) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qy3BL-0000gN-FZ for qemu-devel@nongnu.org; Mon, 29 Aug 2011 10:51:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qy3BF-0000eN-9s for qemu-devel@nongnu.org; Mon, 29 Aug 2011 10:51:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:3211) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qy3BE-0000eD-No for qemu-devel@nongnu.org; Mon, 29 Aug 2011 10:51:17 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p7TEpEgG005335 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 29 Aug 2011 10:51:14 -0400 Received: from dhcp-5-188.str.redhat.com (dhcp-5-175.str.redhat.com [10.32.5.175]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p7TEoed5021975; Mon, 29 Aug 2011 10:51:13 -0400 From: Kevin Wolf To: anthony@codemonkey.ws Date: Mon, 29 Aug 2011 16:53:35 +0200 Message-Id: <1314629618-8308-28-git-send-email-kwolf@redhat.com> In-Reply-To: <1314629618-8308-1-git-send-email-kwolf@redhat.com> References: <1314629618-8308-1-git-send-email-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: kwolf@redhat.com, qemu-devel@nongnu.org Subject: [Qemu-devel] [PATCH 27/30] qcow2: remove unused qcow2_create_refcount_update function 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 From: Frediano Ziglio Signed-off-by: Frediano Ziglio Signed-off-by: Kevin Wolf --- block/qcow2-refcount.c | 18 ------------------ block/qcow2.h | 2 -- 2 files changed, 0 insertions(+), 20 deletions(-) diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c index fbf28da..9605367 100644 --- a/block/qcow2-refcount.c +++ b/block/qcow2-refcount.c @@ -680,24 +680,6 @@ void qcow2_free_any_clusters(BlockDriverState *bs, -void qcow2_create_refcount_update(QCowCreateState *s, int64_t offset, - int64_t size) -{ - int refcount; - int64_t start, last, cluster_offset; - uint16_t *p; - - start = offset & ~(s->cluster_size - 1); - last = (offset + size - 1) & ~(s->cluster_size - 1); - for(cluster_offset = start; cluster_offset <= last; - cluster_offset += s->cluster_size) { - p = &s->refcount_block[cluster_offset >> s->cluster_bits]; - refcount = be16_to_cpu(*p); - refcount++; - *p = cpu_to_be16(refcount); - } -} - /* update the refcounts of snapshots and the copied flag */ int qcow2_update_snapshot_refcount(BlockDriverState *bs, int64_t l1_table_offset, int l1_size, int addend) diff --git a/block/qcow2.h b/block/qcow2.h index de23abe..c8ca3bc 100644 --- a/block/qcow2.h +++ b/block/qcow2.h @@ -189,8 +189,6 @@ void qcow2_free_clusters(BlockDriverState *bs, void qcow2_free_any_clusters(BlockDriverState *bs, uint64_t cluster_offset, int nb_clusters); -void qcow2_create_refcount_update(QCowCreateState *s, int64_t offset, - int64_t size); int qcow2_update_snapshot_refcount(BlockDriverState *bs, int64_t l1_table_offset, int l1_size, int addend);