mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
block: invoke .bdrv_drain callback in coroutine context and from AioContext
This will let the callback take a CoMutex in the next patch. Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20170629132749.997-8-pbonzini@redhat.com> Signed-off-by: Fam Zheng <famz@redhat.com>
This commit is contained in:
parent
e7569c1829
commit
61124f03ab
3 changed files with 37 additions and 13 deletions
|
@ -324,7 +324,7 @@ struct BlockDriver {
|
|||
* Drain and stop any internal sources of requests in the driver, and
|
||||
* remain so until next I/O callback (e.g. bdrv_co_writev) is called.
|
||||
*/
|
||||
void (*bdrv_drain)(BlockDriverState *bs);
|
||||
void coroutine_fn (*bdrv_co_drain)(BlockDriverState *bs);
|
||||
|
||||
void (*bdrv_add_child)(BlockDriverState *parent, BlockDriverState *child,
|
||||
Error **errp);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue