]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
qcow2: remove unused qcow2_create_refcount_update function
authorFrediano Ziglio <freddy77@gmail.com>
Thu, 25 Aug 2011 07:29:32 +0000 (09:29 +0200)
committerKevin Wolf <kwolf@redhat.com>
Thu, 25 Aug 2011 13:23:10 +0000 (15:23 +0200)
Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/qcow2-refcount.c
block/qcow2.h

index fbf28dac1272b21f21008405d77185e261fe9c01..9605367777bd6e856bb139e8e9a1c205d68de3b1 100644 (file)
@@ -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)
index de23abe1a4991ad406536d12fa2f37f11e137735..c8ca3bc574b44dff78b71e649769abad6addf9b3 100644 (file)
@@ -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);