1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-22 17:34:18 +03:00

nodedev: update mdevs on parent change

The parent of the mdev definition can change due to the existance of the
parent device. The parents existance can e.g. depend on the device
driver load state.

Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
This commit is contained in:
Boris Fiuczynski 2022-03-17 10:48:29 +01:00 committed by Michal Privoznik
parent ccb3dc72b8
commit 06aebe8f9a

View File

@ -1669,8 +1669,10 @@ removeMissingPersistentMdev(virNodeDeviceObj *obj,
return false;
for (i = 0; i < data->ndefs; i++) {
/* OK, this mdev is still defined by mdevctl */
if (STREQ(data->defs[i]->name, def->name))
/* OK, this mdev is still defined by mdevctl
* AND the parent object has not changed. */
if (STREQ(data->defs[i]->name, def->name) &&
STREQ(data->defs[i]->parent, def->parent))
return false;
}