mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
block: Add BlockBackend.ctx
This adds a new parameter to blk_new() which requires its callers to declare from which AioContext this BlockBackend is going to be used (or the locks of which AioContext need to be taken anyway). The given context is only stored and kept up to date when changing AioContexts. Actually applying the stored AioContext to the root node is saved for another commit. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
97896a4887
commit
d861ab3acf
33 changed files with 102 additions and 64 deletions
|
@ -417,7 +417,8 @@ static int init_blk_migration(QEMUFile *f)
|
|||
}
|
||||
|
||||
bmds = g_new0(BlkMigDevState, 1);
|
||||
bmds->blk = blk_new(BLK_PERM_CONSISTENT_READ, BLK_PERM_ALL);
|
||||
bmds->blk = blk_new(qemu_get_aio_context(),
|
||||
BLK_PERM_CONSISTENT_READ, BLK_PERM_ALL);
|
||||
bmds->blk_name = g_strdup(bdrv_get_device_name(bs));
|
||||
bmds->bulk_completed = 0;
|
||||
bmds->total_sectors = sectors;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue