Posted as RFC mainly for the benefit of patches 5-8. The first 4 patches could be considered non-RFC material, but posting half of each just didn't seem reasonable. Before I get "too far" into this virobject adjustment and inheritance model, I wanted to be sure the chosen names were suitable and that I read the comments from responses to patch 2 of my previous RFC correctly: https://www.redhat.com/archives/libvir-list/2017-February/msg00521.html at least with respect to how the inheritence should work. Secondarily, like a "real object" - should the API's that act upon the object be part of the object? Of course since virObjectLockable didn't do that I figured I wouldn't do so either (eg, rather than virObjectLock and virObjectUnlock, it could have been obj->Lock() and obj->Unlock()). The next 'logical' step after patch 8 would be to create an object that uses virObjectPoolableHashElement that would be able to effectly look like my previous virPoolObj objects insomuch as it'd have the 'def' pointer, all the various flags, etc. That object then would be consumed by each driver rather than virObjectLockable parent. That's where the real fun begins. Once that's there - moving the add, remove, search/find, etc. API's into virobject with callbacks to do vir*obj.c specific things. So far in my local branches I have a working model of the secret driver using everything here. It's been a painful process to extract out patches and move things along "more slowly", but it's allowed at least one optimization that I didn't consider originally - using primary/secondary names rather than assuming UUID/Name. John Ferlan (8): util: Formatting cleanups to virobject API util: Introduce virObjectGetLockableObj util: Generate a common internal only error print util: Add magic_marker for all virObjects util: Introduce virObjectPoolableHashTable util: Add the hash tables to virObjectPoolableHashTable util: Introduce virObjectPoolableHashElement util: Add virObjectPoolableHashElementGet*Key src/libvirt_private.syms | 8 + src/util/virobject.c | 375 ++++++++++++++++++++++++++++++++++++++++++----- src/util/virobject.h | 132 ++++++++++++++--- 3 files changed, 461 insertions(+), 54 deletions(-) -- 2.9.3 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list