diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2013-01-21 17:09:45 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2013-01-25 18:18:34 +0100 |
commit | 50717e941b9f306a45292621999eeafbaa954418 (patch) | |
tree | fce87f84ffc40ead2ad1b654d7439cc24678f4a7 /block-migration.c | |
parent | acc906c6c5d5745fe7a3a2ed1bb5f0b1d6d1f21b (diff) | |
download | qemu-50717e941b9f306a45292621999eeafbaa954418.tar.gz qemu-50717e941b9f306a45292621999eeafbaa954418.tar.bz2 qemu-50717e941b9f306a45292621999eeafbaa954418.zip |
block: allow customizing the granularity of the dirty bitmap
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block-migration.c')
-rw-r--r-- | block-migration.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/block-migration.c b/block-migration.c index 9d0b037029..9ac7de6d78 100644 --- a/block-migration.c +++ b/block-migration.c @@ -23,7 +23,8 @@ #include "sysemu/blockdev.h" #include <assert.h> -#define BLOCK_SIZE (BDRV_SECTORS_PER_DIRTY_CHUNK << BDRV_SECTOR_BITS) +#define BLOCK_SIZE (1 << 20) +#define BDRV_SECTORS_PER_DIRTY_CHUNK (BLOCK_SIZE >> BDRV_SECTOR_BITS) #define BLK_MIG_FLAG_DEVICE_BLOCK 0x01 #define BLK_MIG_FLAG_EOS 0x02 @@ -254,7 +255,7 @@ static void set_dirty_tracking(int enable) BlkMigDevState *bmds; QSIMPLEQ_FOREACH(bmds, &block_mig_state.bmds_list, entry) { - bdrv_set_dirty_tracking(bmds->bs, enable); + bdrv_set_dirty_tracking(bmds->bs, enable ? BLOCK_SIZE : 0); } } |