From f61e5c13b2efac003194c08f5c7c115ec00fe6dc Mon Sep 17 00:00:00 2001 From: Peter Rajnoha Date: Thu, 12 Aug 2010 04:14:05 +0100 Subject: [PATCH] --- yaml --- r: 209161 b: refs/heads/master c: 7e507eb6432afdd798d4c6dccf949b8c43ef151c h: refs/heads/master i: 209159: c6f268b9c68f0e6080a22a8343c5243437652e56 v: v3 --- [refs] | 2 +- trunk/Documentation/devices.txt | 1 + trunk/drivers/md/dm-ioctl.c | 7 +++++-- trunk/include/linux/dm-ioctl.h | 1 + trunk/include/linux/miscdevice.h | 1 + 5 files changed, 9 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 96260adb6fc2..74be672801b7 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 57cba5d3658d9fdc019c6af14a2d80aefa651e56 +refs/heads/master: 7e507eb6432afdd798d4c6dccf949b8c43ef151c diff --git a/trunk/Documentation/devices.txt b/trunk/Documentation/devices.txt index f2da781705b2..d0d1df6cb5de 100644 --- a/trunk/Documentation/devices.txt +++ b/trunk/Documentation/devices.txt @@ -445,6 +445,7 @@ Your cooperation is appreciated. 233 = /dev/kmview View-OS A process with a view 234 = /dev/btrfs-control Btrfs control device 235 = /dev/autofs Autofs control device + 236 = /dev/mapper/control Device-Mapper control device 240-254 Reserved for local use 255 Reserved for MISC_DYNAMIC_MINOR diff --git a/trunk/drivers/md/dm-ioctl.c b/trunk/drivers/md/dm-ioctl.c index 4d4ced8e4307..3e39193e5036 100644 --- a/trunk/drivers/md/dm-ioctl.c +++ b/trunk/drivers/md/dm-ioctl.c @@ -1599,12 +1599,15 @@ static const struct file_operations _ctl_fops = { }; static struct miscdevice _dm_misc = { - .minor = MISC_DYNAMIC_MINOR, + .minor = MAPPER_CTRL_MINOR, .name = DM_NAME, - .nodename = "mapper/control", + .nodename = DM_DIR "/" DM_CONTROL_NODE, .fops = &_ctl_fops }; +MODULE_ALIAS_MISCDEV(MAPPER_CTRL_MINOR); +MODULE_ALIAS("devname:" DM_DIR "/" DM_CONTROL_NODE); + /* * Create misc character device and link to DM_DIR/control. */ diff --git a/trunk/include/linux/dm-ioctl.h b/trunk/include/linux/dm-ioctl.h index 43b2de17449b..49eab360d5d4 100644 --- a/trunk/include/linux/dm-ioctl.h +++ b/trunk/include/linux/dm-ioctl.h @@ -11,6 +11,7 @@ #include #define DM_DIR "mapper" /* Slashes not supported */ +#define DM_CONTROL_NODE "control" #define DM_MAX_TYPE_NAME 16 #define DM_NAME_LEN 128 #define DM_UUID_LEN 129 diff --git a/trunk/include/linux/miscdevice.h b/trunk/include/linux/miscdevice.h index f6c9b7dcb9fd..bafffc737903 100644 --- a/trunk/include/linux/miscdevice.h +++ b/trunk/include/linux/miscdevice.h @@ -38,6 +38,7 @@ #define KVM_MINOR 232 #define BTRFS_MINOR 234 #define AUTOFS_MINOR 235 +#define MAPPER_CTRL_MINOR 236 #define MISC_DYNAMIC_MINOR 255 struct device;