]> git.karo-electronics.de Git - karo-tx-linux.git/commit
Allow userspace dm log implementations to register their log device so it
authorJonathan E Brassow <jbrassow@redhat.com>
Tue, 1 Nov 2011 00:15:36 +0000 (11:15 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 1 Nov 2011 00:15:36 +0000 (11:15 +1100)
commit58029c27038b40b78f746e8324beb89dea04f9ff
treef984176a8fd2fe94b87d08d49b478a106f277053
parent2c6e59ad80d63eff8f5c7717a3a51f3d519a2089
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: Jonathan Brassow <jbrassow@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
drivers/md/dm-log-userspace-base.c
include/linux/dm-log-userspace.h