diff options
| author | chai wen <chaiw.fnst@cn.fujitsu.com> | 2014-06-04 11:47:37 +0800 |
|---|---|---|
| committer | Stefan Hajnoczi <stefanha@redhat.com> | 2014-06-04 11:22:39 +0200 |
| commit | 1ac362cdbd799eb8165e2e3bb5cd5aa38b1baae3 (patch) | |
| tree | 3534a306f12f2fde93427d0d65c3078f1da9a672 /hw/core | |
| parent | b15446fdbf4ac2b29f6ee5080630a80715abfc20 (diff) | |
| download | focaccia-qemu-1ac362cdbd799eb8165e2e3bb5cd5aa38b1baae3.tar.gz focaccia-qemu-1ac362cdbd799eb8165e2e3bb5cd5aa38b1baae3.zip | |
block: fix wrong order in live block migration setup
The function init_blk_migration is better to be called before set_dirty_tracking as the reasons below. If we want to track dirty blocks via dirty_maps on a BlockDriverState when doing live block-migration, its correspoding 'BlkMigDevState' should be added to block_mig_state.bmds_list first for subsequent processing. Otherwise set_dirty_tracking will do nothing on an empty list than allocating dirty_bitmaps for them. And bdrv_get_dirty_count will access the bmds->dirty_maps directly, then there would be a segfault triggered. If the set_dirty_tracking fails, qemu_savevm_state_cancel will handle the cleanup of init_blk_migration automatically. Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: chai wen <chaiw.fnst@cn.fujitsu.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'hw/core')
0 files changed, 0 insertions, 0 deletions