Re: [RFC PATCH 7/8] block: use the new _change_ API instead of _can_set_ and _set_

2022-07-20 Thread Emanuele Giuseppe Esposito
Am 19/07/2022 um 20:07 schrieb Paolo Bonzini: > On 7/19/22 11:57, Emanuele Giuseppe Esposito wrote: >> >> Wrapping the new drains in aio_context_acquire/release(new_context) is >> not so much helpful either, since apparently the following >> blk_set_aio_context makes aio_poll() hang. >> I am

Re: [RFC PATCH 7/8] block: use the new _change_ API instead of _can_set_ and _set_

2022-07-19 Thread Paolo Bonzini
On 7/19/22 11:57, Emanuele Giuseppe Esposito wrote: Wrapping the new drains in aio_context_acquire/release(new_context) is not so much helpful either, since apparently the following blk_set_aio_context makes aio_poll() hang. I am not sure why, any ideas? I'll take a look, thanks. In any case

Re: [RFC PATCH 7/8] block: use the new _change_ API instead of _can_set_ and _set_

2022-07-19 Thread Emanuele Giuseppe Esposito
Am 18/07/2022 um 18:39 schrieb Paolo Bonzini: > On 7/12/22 23:19, Emanuele Giuseppe Esposito wrote: >> diff --git a/block/block-backend.c b/block/block-backend.c >> index 674eaaa2bf..6e90ac3a6a 100644 >> --- a/block/block-backend.c >> +++ b/block/block-backend.c >> @@ -2184,8 +2184,12 @@ static

Re: [RFC PATCH 7/8] block: use the new _change_ API instead of _can_set_ and _set_

2022-07-18 Thread Paolo Bonzini
On 7/12/22 23:19, Emanuele Giuseppe Esposito wrote: +/* No need to ignore `child`, because it has been detached already */ ignore = NULL; -child->klass->set_aio_ctx(child, s->old_parent_ctx, ); +ret = child->klass->change_aio_ctx(child, s->old_parent_ctx, , +

Re: [RFC PATCH 7/8] block: use the new _change_ API instead of _can_set_ and _set_

2022-07-18 Thread Paolo Bonzini
On 7/12/22 23:19, Emanuele Giuseppe Esposito wrote: diff --git a/block/block-backend.c b/block/block-backend.c index 674eaaa2bf..6e90ac3a6a 100644 --- a/block/block-backend.c +++ b/block/block-backend.c @@ -2184,8 +2184,12 @@ static int blk_do_set_aio_context(BlockBackend *blk, AioContext

Re: [RFC PATCH 7/8] block: use the new _change_ API instead of _can_set_ and _set_

2022-07-15 Thread Hanna Reitz
On 12.07.22 23:19, Emanuele Giuseppe Esposito wrote: Replace all direct usage of ->can_set_aio_ctx and ->set_aio_ctx, and call bdrv_child_try_change_aio_context() in bdrv_try_set_aio_context(), the main function called through the whole block layer. From this point onwards, ->can_set_aio_ctx

[RFC PATCH 7/8] block: use the new _change_ API instead of _can_set_ and _set_

2022-07-12 Thread Emanuele Giuseppe Esposito
Replace all direct usage of ->can_set_aio_ctx and ->set_aio_ctx, and call bdrv_child_try_change_aio_context() in bdrv_try_set_aio_context(), the main function called through the whole block layer. >From this point onwards, ->can_set_aio_ctx and ->set_aio_ctx won't be used anymore. Signed-off-by: