Multipathd doesn't react immediately to multiple things. Reconfiguration doesn't happen immediately. Devices can be added and removed from the system, and multipathd doesn't react until it gets a uevent. Sometimes users need to wait for multipathd to finish handling these events before doing further work. For instance a user script that reconfigures multipath, and then verifies the new configuration can fail if the reconfigure doesn't happen fast enough. User scripts might also need to wait till a device is completely removed from multipath handling before they can continue, or wait for a multipath device to be fully added through udev, etc.
This patchset doesn't add all of these wait commands. It just adds the architecture for doing them and adds the "reconfigure wait" and "reconfigure all wait" commands, to schedule and then wait for a reconfigure. Tracking uevent removes and additions (and first change events for multipath devices) so these can be waited on is more complicated and I haven't finished with them yet. But I wanted to make sure that we agree on the overall waiting architecture. Benjamin Marzinski (4): multipathd: make the wakeup and drain idle_fd code generic multipathd: add infrastructure for uxlsnr waiting on events multipathd: make cli_handlers take a wait_node multipathd: add commands to wait for reconfigures to complete multipathd/callbacks.c | 3 + multipathd/cli.c | 1 + multipathd/cli.h | 7 +- multipathd/cli_handlers.c | 246 ++++++++++++++++++++----------------- multipathd/main.c | 22 +++- multipathd/main.h | 3 +- multipathd/multipathd.8.in | 19 ++- multipathd/uxlsnr.c | 140 ++++++++++++++++++--- multipathd/uxlsnr.h | 4 + 9 files changed, 312 insertions(+), 133 deletions(-) -- 2.56.0
