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

[libvirt] [PATCH v2 0/5] Workaround mdev uevent race affecting node device driver

v1 here https://www.redhat.com/archives/libvir-list/2017-June/msg00826.html

This series addresses [1]. It builds on top of [2], series which introduces
a few small fixes and improvements. Even though that one hasn't gotten a review
yet, you can fetch and build this from my github branch [3].

Changes since v1:
- moved the device handling routine into a detached worker thread, so the event
loop wouldn't block
- adjusted virFileAccess according to the reviewer's comments

Merging the nodedev obj's refactor storing the list of nodedev objects in a
self-lockable object made it possible to drop the driver locks at certain
spots either completely or at least rearrange them according to the needs. The
worker thread therefore doesn't need to hold the driver lock while waiting on
the device's attributes to appear (which would be wrong anyway, since it would
still block the event loop) and only acquires the driver lock when doing sanity
checks on the udev monitor.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1463285
[2] https://www.redhat.com/archives/libvir-list/2017-July/msg01077.html
[3] https://github.com/eskultety/libvirt/commits/mdev-nodedev-next

Erik Skultety (5):
  nodedev: Introduce udevCheckMonitorFD helper function
  udev: Split udevEventHandleCallback in two functions
  udev: Convert udevEventHandleThread to an actual thread routine
  util: Introduce virFileWaitForAccess
  nodedev: Work around the uevent race by hooking up

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


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