]> git.ipfire.org Git - thirdparty/libvirt.git/commit
nodedev: handle mdevs that disappear from mdevctl
authorJonathon Jongsma <jjongsma@redhat.com>
Thu, 9 Jul 2020 21:34:36 +0000 (16:34 -0500)
committerJonathon Jongsma <jjongsma@redhat.com>
Wed, 7 Apr 2021 20:08:59 +0000 (15:08 -0500)
commit259ed0ff285f4a57aa2e53d91fcfc08d081e1e6f
treea0fee0e9e5aa9f2ea688b773648b4650a8d7c684
parent00b649d0cfdc0e9170ec2ff1afc43a25c08ebe49
nodedev: handle mdevs that disappear from mdevctl

mdevctl does not currently provide any events when the list of defined
devices changes, so we will need to poll mdevctl for the list of defined
devices periodically. When a mediated device no longer exists from one
iteration to the next, we need to treat it as an "undefine" event.

When we get such an event, we remove the device from the list if it's
not active. Otherwise, we simply mark it as non-persistent.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
src/node_device/node_device_driver.c