[PATCH 2/3] nodedev: update mdevs on parent change

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx>
---
 src/node_device/node_device_driver.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/node_device/node_device_driver.c b/src/node_device/node_device_driver.c
index 7b2fb3d953..84dde743df 100644
--- a/src/node_device/node_device_driver.c
+++ b/src/node_device/node_device_driver.c
@@ -1670,7 +1670,9 @@ removeMissingPersistentMdev(virNodeDeviceObj *obj,
 
     for (i = 0; i < data->ndefs; i++) {
         /* OK, this mdev is still defined by mdevctl */
-        if (STREQ(data->defs[i]->name, def->name))
+        /* AND the parent object has not changed */
+        if (STREQ(data->defs[i]->name, def->name) &&
+            STREQ(data->defs[i]->parent, def->parent))
             return false;
     }
 
-- 
2.33.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux