[Qemu-devel] [PATCH v2 09/16] commit: Allow aio context change on s->base

Fam Zheng posted 16 patches 8 years, 9 months ago
There is a newer version of this series
[Qemu-devel] [PATCH v2 09/16] commit: Allow aio context change on s->base
Posted by Fam Zheng 8 years, 9 months ago
The block job has the aio context change notifier, we should allow it
here as well.

Signed-off-by: Fam Zheng <famz@redhat.com>
---
 block/commit.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/block/commit.c b/block/commit.c
index c07ee00..1241dd3 100644
--- a/block/commit.c
+++ b/block/commit.c
@@ -391,7 +391,8 @@ void commit_start(const char *job_id, BlockDriverState *bs,
                       | BLK_PERM_RESIZE,
                       BLK_PERM_CONSISTENT_READ
                       | BLK_PERM_GRAPH_MOD
-                      | BLK_PERM_WRITE_UNCHANGED);
+                      | BLK_PERM_WRITE_UNCHANGED
+                      | BLK_PERM_AIO_CONTEXT_CHANGE);
     ret = blk_insert_bs(s->base, base, errp);
     if (ret < 0) {
         goto fail;
-- 
2.9.3


Re: [Qemu-devel] [PATCH v2 09/16] commit: Allow aio context change on s->base
Posted by Stefan Hajnoczi 8 years, 9 months ago
On Wed, Apr 19, 2017 at 05:43:49PM +0800, Fam Zheng wrote:
> The block job has the aio context change notifier, we should allow it
> here as well.
> 
> Signed-off-by: Fam Zheng <famz@redhat.com>
> ---
>  block/commit.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Aside from my question about another user calling bdrv_set_aio_context()
on base in a similar situation in an earlier patch:

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>