Commit 
f9e376797a91 ("ply-device-manager: Consume all events in one go")
changed ply-device-manager to consume all pending udev events in one go
instead of consuming only 1 and then returning back to the mainloop.
The idea here was to avoid the overhead of returning back to the mainloop,
doing the poll again, seeing more events were pending and then re-enter
ply-device-manager.
In retrospect this is not a good idea. Systemd waits for oneshot units
like plymouth-switch-root.service to finish and this can block the boot.
Specifically plymouth-switch-root.service must complete before systemd in
the initrd will exec the systemd from the real rootfs. This means that
systemd inside the initrd waits for the:
ExecStart=-/usr/bin/plymouth update-root-fs --new-root-dir=/sysroot
Command to complete, if this command runs while we are consuming udev
events from the graphics card (which sends a change event per probed
connector during the initial probe), then plymouth will not send the ack
to the plymouth boot-client (completing the ExecStart) until all udev
events are consumed.
On my main workstation with i915 graphics and 2 HDMI connected FHD monitors,
this delays the actual switching of the root by 1.9 - 2.1 seconds,
because the re-enumaration of the connectors in the drm plugin takes
about 0.4 seconds per run.
Other upcoming changes will greatly reduce that 0.4 seconds, but still
returning to the main-loop after a single udev event so that we can
answer any waiting boot-clients ASAP is a good idea.
This reverts commit 
f9e376797a91ad5fbc1f8e8e4aea778f4f22397c.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
         }
 }
 
-static bool
+static void
 on_udev_event (ply_device_manager_t *manager)
 {
         struct udev_device *device;
 
         device = udev_monitor_receive_device (manager->udev_monitor);
         if (device == NULL)
-                return false;
+                return;
 
         action = udev_device_get_action (device);
 
         ply_trace ("got %s event for device %s", action, udev_device_get_sysname (device));
 
         if (action == NULL)
-                return false;
+                return;
 
         if (strcmp (action, "add") == 0 || strcmp (action, "change") == 0) {
                 const char *subsystem;
         }
 
         udev_device_unref (device);
-        return true;
-}
-
-static void
-on_udev_event_loop (ply_device_manager_t *manager)
-{
-        /* Call on_udev_event until all events are consumed */
-        while (on_udev_event (manager)) {}
 }
 
 static void
                                                      fd,
                                                      PLY_EVENT_LOOP_FD_STATUS_HAS_DATA,
                                                      (ply_event_handler_t)
-                                                     on_udev_event_loop,
+                                                     on_udev_event,
                                                      NULL,
                                                      manager);
 }