Skip to content

poll()able DM events

Andy Grover dm-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 16 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3dm: a basic support for using the select or poll functiondrivers/md/dm-core.h drivers/md/dm-ioctl.c drivers/md/dm.c +1 more+57 -213 replies
2/3dm-ioctl: add a new DM_DEV_ARM_POLL ioctldrivers/md/dm-ioctl.c include/uapi/linux/dm-ioctl.h+38 -220 replies
3/3dm-ioctl: report event number in DM_LIST_DEVICESdrivers/md/dm-ioctl.c+5 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] poll()able DM events

Hi Mike,

We've been working off-list to develop a method of getting DM events that is reliable, and also can monitor events from multiple DM devices from a single thread.

In short, these enable an open file descriptor to /dev/mapper/control to be polled. If the fd indicates POLLIN, some DM device has experienced an event. Figuring out which is made easier by adding event_nr in a backwards-compatible way to DM_LIST_DEVICES, so userspace can compare against previously seen per-device event_nrs. A new ioctl is also added, to rearm the fd so it may be re-poll()ed. See individual patch commitlogs for more details.

Thanks to Mikulas for redeveloping earlier versions into this patchset, as well as the other RH LVM devs who provided early internal feedback!

Regards -- Andy

Mikulas Patocka (3):
dm: a basic support for using the select or poll function
dm-ioctl: add a new DM_DEV_ARM_POLL ioctl
dm-ioctl: report event number in DM_LIST_DEVICES

 drivers/md/dm-core.h          |   3 ++
 drivers/md/dm-ioctl.c         | 109 +++++++++++++++++++++++++++++++++---------
 drivers/md/dm.c               |   5 ++
 include/uapi/linux/dm-ioctl.h |   6 ++-
 4 files changed, 99 insertions(+), 24 deletions(-)
Signature · 1 line
2.9.3