From patchwork Thu Aug 25 07:29:32 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frediano Ziglio X-Patchwork-Id: 111483 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 D8CB1B6F18 for ; Thu, 25 Aug 2011 17:29:20 +1000 (EST) Received: from localhost ([::1]:52139 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QwUNJ-0003cP-Cb for incoming@patchwork.ozlabs.org; Thu, 25 Aug 2011 03:29:17 -0400 Received: from eggs.gnu.org ([140.186.70.92]:52264) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QwUNE-0003c1-Cz for qemu-devel@nongnu.org; Thu, 25 Aug 2011 03:29:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QwUND-00056c-CN for qemu-devel@nongnu.org; Thu, 25 Aug 2011 03:29:12 -0400 Received: from mail-vw0-f45.google.com ([209.85.212.45]:33430) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QwUND-00056Y-77 for qemu-devel@nongnu.org; Thu, 25 Aug 2011 03:29:11 -0400 Received: by vws17 with SMTP id 17so1985816vws.4 for ; Thu, 25 Aug 2011 00:29:10 -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; bh=TEvfMERWshfB8ki2uCokXqPCZsMZFn5IBTULbEy87/Y=; b=QHWqCS2XczRkJGwmwjczB/WiSrIEBxrVoVmXzvWepyHPJrxl79MWlXnKyeVm/2JMOC Y0aYfjP/kNaLzHCRw2OTB3zUbrRoJcLN2d4FhWZgNRV3pBgu5YR0pm5ed298Bt1lTngV 4kLF9VbUBajRSoZrQ12VtYkF6vn3H6jeFeTmY= Received: by 10.52.179.199 with SMTP id di7mr4381256vdc.37.1314257350402; Thu, 25 Aug 2011 00:29:10 -0700 (PDT) Received: from obol602.omnitel.it (tor-exp2.cs.georgetown.edu [141.161.20.50]) by mx.google.com with ESMTPS id m1sm123645vcw.39.2011.08.25.00.29.06 (version=SSLv3 cipher=OTHER); Thu, 25 Aug 2011 00:29:10 -0700 (PDT) From: Frediano Ziglio To: kwolf@redhat.com Date: Thu, 25 Aug 2011 09:29:32 +0200 Message-Id: <1314257372-9211-1-git-send-email-freddy77@gmail.com> X-Mailer: git-send-email 1.7.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.212.45 Cc: qemu-devel@nongnu.org, Frediano Ziglio Subject: [Qemu-devel] [PATCH] 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 Signed-off-by: Frediano Ziglio --- 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 2a915be..62946bb 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);