[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC V4 15/30] qcow2: Add qcow2_dedup_init and qcow2_dedup_
From: |
Benoît Canet |
Subject: |
[Qemu-devel] [RFC V4 15/30] qcow2: Add qcow2_dedup_init and qcow2_dedup_close. |
Date: |
Wed, 2 Jan 2013 17:16:18 +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 4c391e5..12a2dad 100644
--- a/block/qcow2-dedup.c
+++ b/block/qcow2-dedup.c
@@ -986,3 +986,19 @@ void coroutine_fn qcow2_co_load_dedup_hashes(void *opaque)
qemu_co_mutex_unlock(&s->lock);
}
}
+
+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 4932750..43586f2 100644
--- a/block/qcow2.h
+++ b/block/qcow2.h
@@ -474,5 +474,7 @@ int qcow2_dedup_store_new_hashes(BlockDriverState *bs,
uint64_t logical_sect,
uint64_t physical_sect);
void coroutine_fn qcow2_co_load_dedup_hashes(void *opaque);
+int qcow2_dedup_init(BlockDriverState *bs);
+void qcow2_dedup_close(BlockDriverState *bs);
#endif
--
1.7.10.4
- Re: [Qemu-devel] [RFC V4 01/30] qcow2: Add deduplication to the qcow2 specification., (continued)
- [Qemu-devel] [RFC V4 02/30] qcow2: Add deduplication structures and fields., Benoît Canet, 2013/01/02
- [Qemu-devel] [RFC V4 04/30] qcow2: Make update_refcount public., Benoît Canet, 2013/01/02
- [Qemu-devel] [RFC V4 05/30] qcow2: Create a way to link to l2 tables when deduplicating., Benoît Canet, 2013/01/02
- [Qemu-devel] [RFC V4 03/30] qcow2: Add qcow2_de dup_read_missing_and_concatenate, Benoît Canet, 2013/01/02
- [Qemu-devel] [RFC V4 07/30] qcow2: Add qcow2_dedup_store_new_hashes., Benoît Canet, 2013/01/02
- [Qemu-devel] [RFC V4 08/30] qcow2: Implement qcow2_compute_cluster_hash., Benoît Canet, 2013/01/02
- [Qemu-devel] [RFC V4 09/30] qcow2: Extract qcow2_dedup_grow_table, Benoît Canet, 2013/01/02
- [Qemu-devel] [RFC V4 10/30] qcow2: Add qcow2_dedup_grow_table and use it., Benoît Canet, 2013/01/02
- [Qemu-devel] [RFC V4 14/30] qcow2-cache: Allow to choose table size at creation., Benoît Canet, 2013/01/02
- [Qemu-devel] [RFC V4 15/30] qcow2: Add qcow2_dedup_init and qcow2_dedup_close.,
Benoît Canet <=
- [Qemu-devel] [RFC V4 17/30] block: Add qemu-img dedup create option., Benoît Canet, 2013/01/02
- [Qemu-devel] [RFC V4 21/30] qcow2: Add verification of dedup table., Benoît Canet, 2013/01/02
- [Qemu-devel] [RFC V4 23/30] qcow2: Add check_dedup_l2 in order to check l2 of dedup table., Benoît Canet, 2013/01/02
- [Qemu-devel] [RFC V4 19/30] qcow2: Integrate deduplication in qcow2_co_writev loop., Benoît Canet, 2013/01/02
- [Qemu-devel] [RFC V4 25/30] qcow2: Integrate SKEIN hash algorithm in deduplication., Benoît Canet, 2013/01/02
- [Qemu-devel] [RFC V4 24/30] qcow2: Do not overwrite existing entries with QCOW_OFLAG_COPIED., Benoît Canet, 2013/01/02
- [Qemu-devel] [RFC V4 30/30] qemu-iotests: Filter dedup=on/off so existing tests don't break., Benoît Canet, 2013/01/02
- [Qemu-devel] [RFC V4 29/30] qcow2: init and cleanup deduplication., Benoît Canet, 2013/01/02