mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
block: Fix locking in external_snapshot_prepare()
bdrv_img_create() polls internally (when calling bdrv_create(), which is a co_wrapper), so it can't be called while holding the lock of any AioContext except the current one without causing deadlocks. Drop the lock around the call in external_snapshot_prepare(). Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-Id: <20221207131838.239125-11-kwolf@redhat.com> Reviewed-by: Emanuele Giuseppe Esposito <eesposit@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
617f3a9635
commit
e135505588
2 changed files with 8 additions and 0 deletions
4
block.c
4
block.c
|
@ -6924,6 +6924,10 @@ bool bdrv_op_blocker_is_empty(BlockDriverState *bs)
|
|||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
* Must not be called while holding the lock of an AioContext other than the
|
||||
* current one.
|
||||
*/
|
||||
void bdrv_img_create(const char *filename, const char *fmt,
|
||||
const char *base_filename, const char *base_fmt,
|
||||
char *options, uint64_t img_size, int flags, bool quiet,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue