diff options
author | Kevin Wolf <kwolf@redhat.com> | 2019-04-25 14:25:10 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2019-06-04 15:22:22 +0200 |
commit | d861ab3acf8dcf817e0c2335979b258847b69564 (patch) | |
tree | 9e334e6976355a7a262e3a9200354008195becfc /qemu-img.c | |
parent | 97896a4887a0a29c3314c5f0e9a82e269a6401fc (diff) |
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>
Diffstat (limited to 'qemu-img.c')
-rw-r--r-- | qemu-img.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/qemu-img.c b/qemu-img.c index b0535919b1..07b6e2a808 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -3313,7 +3313,8 @@ static int img_rebase(int argc, char **argv) BlockDriverState *base_bs = backing_bs(bs); if (base_bs) { - blk_old_backing = blk_new(BLK_PERM_CONSISTENT_READ, + blk_old_backing = blk_new(qemu_get_aio_context(), + BLK_PERM_CONSISTENT_READ, BLK_PERM_ALL); ret = blk_insert_bs(blk_old_backing, base_bs, &local_err); @@ -3360,7 +3361,8 @@ static int img_rebase(int argc, char **argv) prefix_chain_bs = bdrv_find_backing_image(bs, out_real_path); if (prefix_chain_bs) { g_free(out_real_path); - blk_new_backing = blk_new(BLK_PERM_CONSISTENT_READ, + blk_new_backing = blk_new(qemu_get_aio_context(), + BLK_PERM_CONSISTENT_READ, BLK_PERM_ALL); ret = blk_insert_bs(blk_new_backing, prefix_chain_bs, &local_err); |