On Thu, Apr 02, 2026 at 11:12:36 -0400, Cole Robinson via Devel wrote:
Variously 'cfg', 'driver', and 'priv' data are passed around the callstack, but we can get all of those as needed by passing around a single virDomainObj.
The idea to pass in 'cfg' from higher levels especially on code paths which prepare many virStorageSource elements at startup of a VM is to prevent the calls to 'virQEMUDriverGetConfig' which need the central lock - driver->lock - to be taken. I'd suggest you don't remove those at least on the code paths which are called back-to-back. Refactoring passing of 'driver' or 'priv' to pass the whole 'vm' is okay but note that in most cases our prevailing coding style is to pass 'vm' as first argument'.
Upcoming patches need vm->def as well, so let's clean this up first
Signed-off-by: Cole Robinson <crobinso@redhat.com> ---