First page Back Continue Last page Graphics
dm-ioctl - DM_DEV_WAIT
Doesn't return until an event is triggered on the device.
Events are triggered when userspace might need to take action e.g. if a snapshot runs out of space or there's a multipath path failure.
It's a simple mechanism to tell userspace 'something significant happened', and then userspace can check the device status and decide whether to do anything or not. It's more efficient than having a userspace daemon checking at regular intervals.
To avoid missing the fact that an event happened while the daemon was already handling an earlier one, there's an event counter that gets incremented with each event. The calling process supplies the last event number it knows about and the command returns immediately if it missed one or more.
It'll get replaced with something more sophisticated in future.