[Qemu-devel] [PATCH for-2.9 1/2] commit: Set commit_top_bs->aio_context

Kevin Wolf posted 2 patches 8 years, 10 months ago
[Qemu-devel] [PATCH for-2.9 1/2] commit: Set commit_top_bs->aio_context
Posted by Kevin Wolf 8 years, 10 months ago
The filter driver that is inserted by the commit job needs to use the
same AioContext as its parent and child nodes.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 block/commit.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/block/commit.c b/block/commit.c
index 2832482..4c38220 100644
--- a/block/commit.c
+++ b/block/commit.c
@@ -335,6 +335,7 @@ void commit_start(const char *job_id, BlockDriverState *bs,
     if (commit_top_bs == NULL) {
         goto fail;
     }
+    bdrv_set_aio_context(commit_top_bs, bdrv_get_aio_context(top));
 
     bdrv_set_backing_hd(commit_top_bs, top, &local_err);
     if (local_err) {
@@ -482,6 +483,7 @@ int bdrv_commit(BlockDriverState *bs)
         error_report_err(local_err);
         goto ro_cleanup;
     }
+    bdrv_set_aio_context(commit_top_bs, bdrv_get_aio_context(backing_file_bs));
 
     bdrv_set_backing_hd(commit_top_bs, backing_file_bs, &error_abort);
     bdrv_set_backing_hd(bs, commit_top_bs, &error_abort);
-- 
1.8.3.1


Re: [Qemu-devel] [PATCH for-2.9 1/2] commit: Set commit_top_bs->aio_context
Posted by Eric Blake 8 years, 10 months ago
On 04/06/2017 12:14 PM, Kevin Wolf wrote:
> The filter driver that is inserted by the commit job needs to use the
> same AioContext as its parent and child nodes.
> 
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
>  block/commit.c | 2 ++
>  1 file changed, 2 insertions(+)
> 

Reviewed-by: Eric Blake <eblake@redhat.com>

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org