On Wed, Nov 04, 2015 at 08:19:40PM +0300, Denis V. Lunev wrote: > aio_context should be locked in the similar way as was done in QMP > snapshot creation in the other case there are a lot of possible > troubles if native AIO mode is enabled for disk. > > qemu_fopen_bdrv and bdrv_fclose are used in real snapshot operations only > along with block drivers. This change should influence only HMP snapshot > operations. > > AioContext lock is reqursive. Thus nested locking should not be a problem.
hmp_savevm() and load_vmstate() look up the BlockDriverState and perform other operations on it. So the natural place to call acquire/release is in hmp_savevm() and load_vmstate(). They need that anyway since they also perform other operations. qemu_fopen_bdrv() and bdrv_fclose() don't need to worry about AioContext.
signature.asc
Description: PGP signature