@@ -716,3 +716,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);
+}
@@ -391,5 +391,7 @@ void qcow2_dedup_start_loading_hashes(BlockDriverState *bs);
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