• Milan Broz's avatar
    dm ioctl: support cookies for udev · 60935eb2
    Milan Broz authored
    Add support for passing a 32 bit "cookie" into the kernel with the
    DM_SUSPEND, DM_DEV_RENAME and DM_DEV_REMOVE ioctls.  The (unsigned)
    value of this cookie is returned to userspace alongside the uevents
    issued by these ioctls in the variable DM_COOKIE.
    
    This means the userspace process issuing these ioctls can be notified
    by udev after udev has completed any actions triggered.
    
    To minimise the interface extension, we pass the cookie into the
    kernel in the event_nr field which is otherwise unused when calling
    these ioctls.  Incrementing the version number allows userspace to
    determine in advance whether or not the kernel supports the cookie.
    If the kernel does support this but userspace does not, there should
    be no impact as the new variable will just get ignored.
    Signed-off-by: default avatarMilan Broz <mbroz@redhat.com>
    Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.com>
    60935eb2
dm-ioctl.h 8.9 KB