@@ -1070,3 +1070,9 @@ void qcow2_dedup_destroy_hash(BlockDriverState *bs,
/* remove from ram if present so we won't dedup with it anymore */
qcow2_remove_hash_node_by_sector(bs, physical_sect);
}
+
+bool qcow2_dedup_is_running(BlockDriverState *bs)
+{
+ BDRVQcowState *s = bs->opaque;
+ return s->has_dedup && s->dedup_status == DEDUP_STATUS_STARTED;
+}
@@ -498,5 +498,6 @@ int qcow2_dedup_store_new_hashes(BlockDriverState *bs,
uint64_t physical_sect);
void qcow2_dedup_destroy_hash(BlockDriverState *bs,
uint64_t cluster_index);
+bool qcow2_dedup_is_running(BlockDriverState *bs);
#endif
Signed-off-by: Benoit Canet <benoit@irqsave.net> --- block/qcow2-dedup.c | 6 ++++++ block/qcow2.h | 1 + 2 files changed, 7 insertions(+)