Re: [libvirt] [PATCH v3 1/6] nodedev: Introduce udevCheckMonitorFD helper function

2017-08-29 Thread Erik Skultety
[...] > > + > > +if (!udevCheckMonitorFD(udev_monitor, fd)) > > +goto unlock;> + > > +if (!(device = udev_monitor_receive_device(udev_monitor))) { > > virReportError(VIR_ERR_INTERNAL_ERROR, "%s", > > _("udev_monitor_receive_device returned NULL"));

Re: [libvirt] [PATCH v3 1/6] nodedev: Introduce udevCheckMonitorFD helper function

2017-08-28 Thread John Ferlan
On 08/24/2017 07:23 AM, Erik Skultety wrote: > We need to perform some sanity checks on the udev monitor before every > use so that we know nothing changed in the meantime. The reason for > moving the code to a separate function is to be able to perform the same > check from a worker thread that

[libvirt] [PATCH v3 1/6] nodedev: Introduce udevCheckMonitorFD helper function

2017-08-24 Thread Erik Skultety
We need to perform some sanity checks on the udev monitor before every use so that we know nothing changed in the meantime. The reason for moving the code to a separate function is to be able to perform the same check from a worker thread that will replace the udevEventHandleCallback in terms of po