On 7/26/21 4:47 PM, Michal Prívozník wrote:
On 7/23/21 6:40 PM, Jonathon Jongsma wrote:
> Unfortunately, mdevctl supports defining more than one mdev with the
> same UUID as long as they have different parent devices. (Only one of
> these devices can be active at any given time).
>
> This means that we can't use the UUID alone as a way to uniquely
> identify mdev node devices. Append the parent address to ensure
> uniqueness. For example:
>
> Before: mdev_88a6b868_46bd_4015_8e5b_26107f82da38
> After: mdev_88a6b868_46bd_4015_8e5b_26107f82da38_0000_00_02_0
>
> Related:
https://bugzilla.redhat.com/show_bug.cgi?id=1979440
>
> Signed-off-by: Jonathon Jongsma <jjongsma(a)redhat.com>
> ---
> src/node_device/node_device_driver.c | 3 ++-
> src/node_device/node_device_udev.c | 2 +-
> tests/nodedevmdevctldata/mdevctl-list-multiple.out.xml | 8 ++++----
> 3 files changed, 7 insertions(+), 6 deletions(-)
The patch looks good, but for some reason it leaves API breakage
aftertaste. But I guess we don't document anywhere what MDEV <name/>
looks like, do we? IOW - we are free to change it if needed.
Michal
Michal, Jonathon,
now that the name change broke the undocumented {bus}_{device} format
pattern I am coping with the aftermath.
Besides the fact that before- and after-format pattern support cannot
easily be introspected until actually dealing with an mdev and than try
to make sense from its name I am confronted with two general questions:
1. How stable are nodedev object names?
2. Do nodedev object names contain bus and device address information
one can rely on or are they (since the format is undocumented) just
arbitrary characters?
--
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