On 05/19/2012 01:52 AM, Eric Blake wrote:
Use of virConnectListDomains() and virConnectListDefinedDomains() is:
1. inherently racy. A domain can change between active and inactive
between two back-to-back calls, and thus be entirely skipped or
enumerated twice when concatenating lists.
2.
This patchset adds a atomic way to list guests. A more detailed description is
in patch 1.
Peter Krempa (5):
lib: Add public api to enable atomic listing of guest
python: add API exports for virConnectListAllDomains()
remote: implement remote protocol for virConnectListAllDomains()
qemu:
This patch adds a basic implementation of the listing code for
virConnectListAllDomains() to qemu driver. The listing code does
not support any filtering flags yet, but they may be easily added
later.
---
src/qemu/qemu_driver.c | 97
1 files
This patch adds export of the new API function
virConnectListAllDomains() to the libvirt-python bindings. The
virConnect object now has method listAllDomains that takes only the
flags parameter and returns a python list of virDomain object
corresponding to virDomainPtrs returned by the underlying
This patch adds a new public api that lists domains. The new approach is
different from those used before. There are four key points to this:
1) The list is acquired atomicaly and contains both active and inactive
domains (guests). This eliminates the need to call two different list
APIs, where
This patch makes use of the newly added api virConnectListAllDomains()
to list domains in virsh.
To enable fallback virsh now represents lists of domains using an
internal structure vshDomainList. This structure contains the
virDomainPtr list as provided by virConnectListAllDomains() and the
This patch wires up the RPC protocol handlers for
virConnectListAllDomains(). The RPC generator has no support for the way
how virConnectListAllDomains() returns the results so the handler code
had to be done manually.
The new api is handled by REMOTE_PROC_CONNECT_LIST_ALL_DOMAINS, with
number