Re: [libvirt PATCH] nodedev: Handle inactive mdevs with the same UUID

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

 



On 7/6/21 9:05 PM, Jonathon Jongsma wrote:
Unfortunately, mdevctl supports defining more than one mdev with the
same UUID as long as they have different parent devices. So we can't use
the UUID alone as a way to uniquely identify these node devices. Append
the parent name to ensure uniqueness. For example:

     Before: mdev_88a6b868_46bd_4015_8e5b_26107f82da38
     After:  mdev_88a6b868_46bd_4015_8e5b_26107f82da38_0000_00_02_0

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1979440

Signed-off-by: Jonathon Jongsma <jjongsma@xxxxxxxxxx>
---
QUESTION: Is there any expectation of stability in these device names? I'm not
sure to what extent these changes might affect users. Given that support for
persistent mdevs is fairly new, there are likely not many users yet.

People using mdevs with libvirt will certainly be impacted by this but I am not sure how many there are.

I am wondering if the scenario is even useful since I just tried it out and starting the second mdev with the uuid fails.

# mdevctl list -d
e60cef97-3f6b-485e-ac46-0520f9f66ac2 0.0.0033 vfio_ccw-io manual (active)
e60cef97-3f6b-485e-ac46-0520f9f66ac2 0.0.0034 vfio_ccw-io manual
# mdevctl start -u e60cef97-3f6b-485e-ac46-0520f9f66ac2 -p 0.0.0034
Device exists under different parent



  src/node_device/node_device_driver.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/node_device/node_device_driver.c b/src/node_device/node_device_driver.c
index b4dd57e5f4..89dc704162 100644
--- a/src/node_device/node_device_driver.c
+++ b/src/node_device/node_device_driver.c
@@ -1038,7 +1038,7 @@ nodeDeviceGetMdevctlListCommand(bool defined,
static void mdevGenerateDeviceName(virNodeDeviceDef *dev)
  {
-    nodeDeviceGenerateName(dev, "mdev", dev->caps->data.mdev.uuid, NULL);
+    nodeDeviceGenerateName(dev, "mdev", dev->caps->data.mdev.uuid, dev->parent);
  }


--
Mit freundlichen Grüßen/Kind regards
   Boris Fiuczynski

IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Gregor Pillen
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294





[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