On Tue, Nov 14, 2017 at 03:56:59PM +0000, Richard W.M. Jones wrote:
 Going back to the original problem, perhaps we could have fixed
 it instead by acquiring a lock around all plugin callbacks, and
 ensuring that plugin_cleanup also acquires the same lock.  The
 lock would normally be uncontended so it shouldn't cause any
 performance issues.  That would be a fairly simple revert of
 63f0eb088 + alternate fix. 
No actually that would serialize everything.  Some sort of mutex
primitive, I think a shared/exclusive lock with the exclusive lock
being taken in plugin_cleanup.
Rich.
-- 
Richard Jones, Virtualization Group, Red Hat 
http://people.redhat.com/~rjones
Read my programming and virtualization blog: 
http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v