On 20/01/2016 08:12, Denis V. Lunev wrote: > There is a possibility to hit assert qcow2_get_specific_info that > s->qcow_version is undefined. This happens when VM in starting from > suspended state, i.e. it processes incoming migration, and in the same > time 'info block' is called. > > The problem is that in the qcow2_invalidate_cache closes and the image > and memsets BDRVQcowState in the middle. > > The patch moves processing of qcow2_get_specific_info into coroutine > context and ensures that qcow2_invalidate_cache and qcow2_get_specific_info > can not run simultaneosly.
I'm sitting next to Kevin :) and this is not a qcow2 bug. The problem is that qcow2_invalidate_cache is being called in coroutine context. The process_incoming_migration_co code starting with bdrv_invalidate_cache_all should be moved out of the coroutine and into the main loop. You can use a bottom half to get out of coroutine context. The result should be a much simpler patch, too. Thanks, and sorry for the delay. I saw qcow2 in the title and assumed it was something I knew nothing about. :) Paolo