]> git.ipfire.org Git - thirdparty/libvirt.git/commit
nodedev: refactor mdevctl thread functions
authorJonathon Jongsma <jjongsma@redhat.com>
Wed, 5 Jul 2023 20:35:59 +0000 (15:35 -0500)
committerJonathon Jongsma <jjongsma@redhat.com>
Thu, 13 Jul 2023 14:43:45 +0000 (09:43 -0500)
commit9b7fadc5dc33b85b597c95d944dc23c02c29c29f
tree54d3eadd9dc32659cd741ad26d3c5833555850c4
parent37481aa1f15ece6b187b8fa219966f77648c813d
nodedev: refactor mdevctl thread functions

Factor out a new scheduleMdevctlUpdate() function so that we can re-use
it from other places. Now that other events can make it necessary to
re-query mdevctl for mdev updates, this function will be useful for
coalescing multiple updates in quick succession into a single mdevctl
query.

Also rename a couple functions. The names weren't very descriptive of
their behavior. For example, the old scheduleMdevctlHandler() function
didn't actually schedule anything, it just started a thread. So rename
it to free up the 'schedule' name for the above refactored function.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
src/node_device/node_device_udev.c