[libvirt] [PATCH 3/4] qemu: Don't remove hash entry of other domains

Daniel P. Berrange berrange at redhat.com
Mon Feb 11 10:59:30 UTC 2013


On Fri, Feb 08, 2013 at 09:08:01PM +0800, Osier Yang wrote:
> qemuProcessStart invokes qemuProcessStop when fails, to avoid
> removing hash entry which belongs to other domain(s), this introduces
> a new virBitmapPtr argument for qemuProcessStop. And qemuProcessStart
> sets the bit for the disk only if it's successfully added into the
> hash table. Thus if the argument is provided for qemuProcessStop, it
> can't remove the hash entry belongs to other domain(s).

I find this approach rather dubious - IMHO it is a sign that you're
not recording enough information in the shared disk hash. eg perhaps
the hash ought to be recording the UUID of each VM that is holding
a reference. That way you're protected from qemuProcessStop() trying
todo something wrong.

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the libvir-list mailing list