From 323004a39d4d8d33c744a5b108f80bfe6402fca3 Mon Sep 17 00:00:00 2001 From: Peter Lieven Date: Thu, 18 Jul 2013 09:48:50 +0200 Subject: block-migration: efficiently encode zero blocks this patch adds a efficient encoding for zero blocks by adding a new flag indicating a block is completely zero. additionally bdrv_write_zeros() is used at the destination to efficiently write these zeroes. depending on the implementation this avoids that the destination target gets fully provisioned. Signed-off-by: Peter Lieven Signed-off-by: Stefan Hajnoczi --- migration.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'migration.c') diff --git a/migration.c b/migration.c index 9f5a4230d1..a9c042186d 100644 --- a/migration.c +++ b/migration.c @@ -493,6 +493,15 @@ bool migrate_auto_converge(void) return s->enabled_capabilities[MIGRATION_CAPABILITY_AUTO_CONVERGE]; } +bool migrate_zero_blocks(void) +{ + MigrationState *s; + + s = migrate_get_current(); + + return s->enabled_capabilities[MIGRATION_CAPABILITY_ZERO_BLOCKS]; +} + int migrate_use_xbzrle(void) { MigrationState *s; -- cgit v1.2.1