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

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

 



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@xxxxxxxxxx>
---
  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





[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