Patchwork [RFC,V4,04/30] qcow2: Make update_refcount public.

login
register
mail settings
Submitter Benoît Canet
Date Jan. 2, 2013, 4:16 p.m.
Message ID <1357143393-29832-5-git-send-email-benoit@irqsave.net>
Download mbox | patch
Permalink /patch/209104/
State New
Headers show

Comments

Benoît Canet - Jan. 2, 2013, 4:16 p.m.
Signed-off-by: Benoit Canet <benoit@irqsave.net>
---
 block/qcow2-refcount.c |    6 +-----
 block/qcow2.h          |    2 ++
 2 files changed, 3 insertions(+), 5 deletions(-)

Patch

diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c
index 6a95aa6..e014b0e 100644
--- a/block/qcow2-refcount.c
+++ b/block/qcow2-refcount.c
@@ -27,10 +27,6 @@ 
 #include "block/qcow2.h"
 
 static int64_t alloc_clusters_noref(BlockDriverState *bs, int64_t size);
-static int QEMU_WARN_UNUSED_RESULT update_refcount(BlockDriverState *bs,
-                            int64_t offset, int64_t length,
-                            int addend);
-
 
 /*********************************************************/
 /* refcount handling */
@@ -413,7 +409,7 @@  fail_block:
 }
 
 /* XXX: cache several refcount block clusters ? */
-static int QEMU_WARN_UNUSED_RESULT update_refcount(BlockDriverState *bs,
+int QEMU_WARN_UNUSED_RESULT update_refcount(BlockDriverState *bs,
     int64_t offset, int64_t length, int addend)
 {
     BDRVQcowState *s = bs->opaque;
diff --git a/block/qcow2.h b/block/qcow2.h
index 730c9be..3307481 100644
--- a/block/qcow2.h
+++ b/block/qcow2.h
@@ -384,6 +384,8 @@  int qcow2_update_snapshot_refcount(BlockDriverState *bs,
 
 int qcow2_check_refcounts(BlockDriverState *bs, BdrvCheckResult *res,
                           BdrvCheckMode fix);
+int QEMU_WARN_UNUSED_RESULT update_refcount(BlockDriverState *bs,
+    int64_t offset, int64_t length, int addend);
 
 /* qcow2-cluster.c functions */
 int qcow2_grow_l1_table(BlockDriverState *bs, int min_size, bool exact_size);