[libvirt] [PATCH v3 0/6] Work around the kernel mdev uevent race in nodedev

Erik Skultety eskultet at redhat.com
Thu Aug 24 11:23:26 UTC 2017

v2 here: https://www.redhat.com/archives/libvir-list/2017-July/msg01268.html

Since v2:
- added patch 4/6 that fixes the issue with the handler thread spamming logs
with "udev_monitor_receive_device returned NULL"
  -> the event loop callback now disables polling on the udev monitor's fd
     every time there's a new event, leaving the responsibility for re-enabling
     it back to the handler thread once it had removed the corresponding data
     from the socket.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1463285

Erik Skultety (6):
  nodedev: Introduce udevCheckMonitorFD helper function
  udev: Split udevEventHandleCallback in two functions
  udev: Convert udevEventHandleThread to an actual thread routine
  nodedev: Disable/re-enable polling on the udev fd
  util: Introduce virFileWaitForAccess
  nodedev: Work around the uevent race by hooking up

 src/libvirt_private.syms           |   1 +
 src/node_device/node_device_udev.c | 208 ++++++++++++++++++++++++++++++++-----
 src/util/virfile.c                 |  29 ++++++
 src/util/virfile.h                 |   2 +
 4 files changed, 214 insertions(+), 26 deletions(-)


More information about the libvir-list mailing list