
On 12/20/2013 02:36 PM, Jiri Denemark wrote:
Generally, every API that is going to begin a job should do that before fetching data from vm->def. However, qemuDomainGetBlockInfo does not know whether it will have to start a job or not before checking vm->def. To avoid using disk alias that might have been freed while we were waiting for a job, we use its copy. In case the disk was removed in the meantime, we will fail with "cannot find statistics for device '...'" error message.
Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- src/qemu/qemu_driver.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-)
This fixes the potential for a crash, but isn't this related to the same problem that John has been working on? That is, when one thread is migrating a domain and the other is getting block info, we have a race where qemu will quit before we get a chance to probe for the block info. https://www.redhat.com/archives/libvir-list/2013-December/msg00984.html Would changing when we grab the job (and grabbing it unconditionally, even if we end up not needing to query) help solve both issues? -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org