• Jonathan E Brassow's avatar
    dm log userspace: add log device dependency · 5a25f0eb
    Jonathan E Brassow authored
    Allow userspace dm log implementations to register their log device so it
    is no longer missing from the list of device dependencies.
    
    When device mapper targets use a device they normally call dm_get_device
    which includes it in the device list returned to userspace applications
    such as LVM through the DM_TABLE_DEPS ioctl.  Userspace log devices
    don't use dm_get_device as userspace opens them so they are missing from
    the list of dependencies.
    
    This patch extends the DM_ULOG_CTR operation to allow userspace to
    respond with the name of the log device (if appropriate) to be
    registered via 'dm_get_device'.  DM_ULOG_REQUEST_VERSION is incremented.
    
    This is backwards compatible.  If the kernel and userspace log server
    have both been updated, the new information will be passed down to the
    kernel and the device will be registered.  If the kernel is new, but
    the log server is old, the log server will not pass down any device
    information and the kernel will simply bypass the device registration
    as before.  If the kernel is old but the log server is new, the log
    server will see the old version number and not pass the device info.
    Signed-off-by: default avatarJonathan Brassow <jbrassow@redhat.com>
    Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.com>
    5a25f0eb
dm-log-userspace.h 14.1 KB