On 7/23/21 6:40 PM, Jonathon Jongsma wrote:
Since UUID is not guaranteed to be unique by mdevctl, we may have
more
than one nodedev with the same UUID. Therefore, we need to disambiguate
when looking up mdevs by specifying the UUID and parent address, which
mdevctl guarantees to be a unique combination.
Signed-off-by: Jonathon Jongsma <jjongsma(a)redhat.com>
---
src/conf/virnodedeviceobj.c | 18 ++++++++++++++----
src/conf/virnodedeviceobj.h | 3 ++-
src/node_device/node_device_driver.c | 24 ++++++++++++++++--------
3 files changed, 32 insertions(+), 13 deletions(-)
diff --git a/src/conf/virnodedeviceobj.c b/src/conf/virnodedeviceobj.c
index 6e7b354f96..d1d23fc857 100644
--- a/src/conf/virnodedeviceobj.c
+++ b/src/conf/virnodedeviceobj.c
@@ -401,13 +401,20 @@ virNodeDeviceObjListFindSCSIHostByWWNs(virNodeDeviceObjList *devs,
&data);
}
+
+typedef struct {
+ const char *uuid;
+ const char *parent_addr;
+} FindMediatedDeviceData;
+
Again, typedef on one line, struct on the other.
Michal