[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC V3 13/24] qcow2: Add qcow2_dedup_init and qcow2_dedup_
From: |
Benoît Canet |
Subject: |
[Qemu-devel] [RFC V3 13/24] qcow2: Add qcow2_dedup_init and qcow2_dedup_close. |
Date: |
Mon, 26 Nov 2012 14:05:12 +0100 |
Signed-off-by: Benoit Canet <address@hidden>
---
block/qcow2-dedup.c | 16 ++++++++++++++++
block/qcow2.h | 2 ++
2 files changed, 18 insertions(+)
diff --git a/block/qcow2-dedup.c b/block/qcow2-dedup.c
index 1760e8a..80e9477 100644
--- a/block/qcow2-dedup.c
+++ b/block/qcow2-dedup.c
@@ -793,3 +793,19 @@ int qcow2_dedup_grow_table(BlockDriverState *bs,
qcow2_dedup_save_table_info,
"dedup");
}
+
+int qcow2_dedup_init(BlockDriverState *bs)
+{
+ BDRVQcowState *s = bs->opaque;
+ return qcow2_do_table_init(bs,
+ &s->dedup_table,
+ s->dedup_table_offset,
+ s->dedup_table_size,
+ false);
+}
+
+void qcow2_dedup_close(BlockDriverState *bs)
+{
+ BDRVQcowState *s = bs->opaque;
+ g_free(s->dedup_table);
+}
diff --git a/block/qcow2.h b/block/qcow2.h
index af80d16..87a7f43 100644
--- a/block/qcow2.h
+++ b/block/qcow2.h
@@ -405,5 +405,7 @@ void coroutine_fn qcow2_co_load_dedup_hashes(void *opaque);
int qcow2_dedup_grow_table(BlockDriverState *bs,
int min_size,
bool exact_size);
+int qcow2_dedup_init(BlockDriverState *bs);
+void qcow2_dedup_close(BlockDriverState *bs);
#endif
--
1.7.10.4
- [Qemu-devel] [RFC V3 00/24] QCOW2 deduplication, Benoît Canet, 2012/11/26
- [Qemu-devel] [RFC V3 02/24] qcow2: Add deduplication structures and fields., Benoît Canet, 2012/11/26
- [Qemu-devel] [RFC V3 01/24] qcow2: Add deduplication to the qcow2 specification., Benoît Canet, 2012/11/26
- [Qemu-devel] [RFC V3 04/24] qcow2: Make update_cluster_refcount public., Benoît Canet, 2012/11/26
- [Qemu-devel] [RFC V3 05/24] qcow2: Create a way to link to l2 tables in dedup., Benoît Canet, 2012/11/26
- [Qemu-devel] [RFC V3 03/24] qcow2: Add qcow2_de dup_read_missing_and_concatenate, Benoît Canet, 2012/11/26
- [Qemu-devel] [RFC V3 06/24] qcow2: Add qcow2_dedup and related functions., Benoît Canet, 2012/11/26
- [Qemu-devel] [RFC V3 09/24] qcow2: Extract qcow2_dedup_grow_table, Benoît Canet, 2012/11/26
- [Qemu-devel] [RFC V3 13/24] qcow2: Add qcow2_dedup_init and qcow2_dedup_close.,
Benoît Canet <=
- [Qemu-devel] [RFC V3 12/24] qcow2: Extract qcow2_do_table_init., Benoît Canet, 2012/11/26
- [Qemu-devel] [RFC V3 11/24] qcow2: Load and save deduplication table header extension., Benoît Canet, 2012/11/26
- [Qemu-devel] [RFC V3 14/24] qcow2: Extract qcow2_add_feature and qcow2_remove_feature., Benoît Canet, 2012/11/26
- [Qemu-devel] [RFC V3 16/24] qcow2: Allow creation of images using deduplication., Benoît Canet, 2012/11/26
- [Qemu-devel] [RFC V3 17/24] qcow2: Behave correctly when refcount reach 0 or 2^16., Benoît Canet, 2012/11/26
- [Qemu-devel] [RFC V3 19/24] qcow2: Add verification of dedup table., Benoît Canet, 2012/11/26
- [Qemu-devel] [RFC V3 24/24] qemu-iotests: Filter dedup=on/off so existing tests don't break., Benoît Canet, 2012/11/26
- [Qemu-devel] [RFC V3 20/24] qcow2: Adapt checking of QCOW_OFLAG_COPIED for dedup., Benoît Canet, 2012/11/26
- [Qemu-devel] [RFC V3 22/24] qcow2: Do not overwrite existing entries with QCOW_OFLAG_COPIED., Benoît Canet, 2012/11/26
- [Qemu-devel] [RFC V3 07/24] qcow2: Add qcow2_dedup_write_new_hashes., Benoît Canet, 2012/11/26