[libvirt] [PATCH 08/17] conf: give each hostdevdef a parent pointer
Eric Blake
eblake at redhat.com
Sat Mar 3 02:37:49 UTC 2012
On 02/28/2012 01:14 PM, Laine Stump wrote:
> The parent can be any type of device. It defaults to type=none, and a
> NULL pointer. The intent is that if a hostdevdef is contained in the
> def for a higher level device (e.g. virDomainNetDef), hostdev->parent
> will point to the higher level device, and type will be set to that
> type of device. This way, during attach and detach of the device,
> parent can be checked, and appropriate callouts made to do higher
> level device initialization (e.g. setting MAC address).
>
> Also, although these hostdevs with parents will be added to a domain's
> hostdevs list, they will be treated slightly differently when
> traversing the list, e.g. virDomainHostdefDefFree for a hostdev that
> has a parent doesn't need to be called (and will be a NOP); it will
> simply be removed from the list (since the parent device object is in
> its own type-specific list, and will be freed from there).
> ---
> V2: unchanged from V1
>
> src/conf/domain_conf.c | 12 ++++++++++--
> src/conf/domain_conf.h | 1 +
> 2 files changed, 11 insertions(+), 2 deletions(-)
ACK.
--
Eric Blake eblake at redhat.com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120302/22ccd706/attachment-0001.sig>
More information about the libvir-list
mailing list