diff options
| -rw-r--r-- | Documentation/devices.txt | 1 | ||||
| -rw-r--r-- | drivers/md/dm-ioctl.c | 7 | ||||
| -rw-r--r-- | include/linux/dm-ioctl.h | 1 | ||||
| -rw-r--r-- | include/linux/miscdevice.h | 1 |
4 files changed, 8 insertions, 2 deletions
diff --git a/Documentation/devices.txt b/Documentation/devices.txt index f2da781705b2..d0d1df6cb5de 100644 --- a/Documentation/devices.txt +++ b/Documentation/devices.txt | |||
| @@ -445,6 +445,7 @@ Your cooperation is appreciated. | |||
| 445 | 233 = /dev/kmview View-OS A process with a view | 445 | 233 = /dev/kmview View-OS A process with a view |
| 446 | 234 = /dev/btrfs-control Btrfs control device | 446 | 234 = /dev/btrfs-control Btrfs control device |
| 447 | 235 = /dev/autofs Autofs control device | 447 | 235 = /dev/autofs Autofs control device |
| 448 | 236 = /dev/mapper/control Device-Mapper control device | ||
| 448 | 240-254 Reserved for local use | 449 | 240-254 Reserved for local use |
| 449 | 255 Reserved for MISC_DYNAMIC_MINOR | 450 | 255 Reserved for MISC_DYNAMIC_MINOR |
| 450 | 451 | ||
diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c index 4d4ced8e4307..3e39193e5036 100644 --- a/drivers/md/dm-ioctl.c +++ b/drivers/md/dm-ioctl.c | |||
| @@ -1599,12 +1599,15 @@ static const struct file_operations _ctl_fops = { | |||
| 1599 | }; | 1599 | }; |
| 1600 | 1600 | ||
| 1601 | static struct miscdevice _dm_misc = { | 1601 | static struct miscdevice _dm_misc = { |
| 1602 | .minor = MISC_DYNAMIC_MINOR, | 1602 | .minor = MAPPER_CTRL_MINOR, |
| 1603 | .name = DM_NAME, | 1603 | .name = DM_NAME, |
| 1604 | .nodename = "mapper/control", | 1604 | .nodename = DM_DIR "/" DM_CONTROL_NODE, |
| 1605 | .fops = &_ctl_fops | 1605 | .fops = &_ctl_fops |
| 1606 | }; | 1606 | }; |
| 1607 | 1607 | ||
| 1608 | MODULE_ALIAS_MISCDEV(MAPPER_CTRL_MINOR); | ||
| 1609 | MODULE_ALIAS("devname:" DM_DIR "/" DM_CONTROL_NODE); | ||
| 1610 | |||
| 1608 | /* | 1611 | /* |
| 1609 | * Create misc character device and link to DM_DIR/control. | 1612 | * Create misc character device and link to DM_DIR/control. |
| 1610 | */ | 1613 | */ |
diff --git a/include/linux/dm-ioctl.h b/include/linux/dm-ioctl.h index 43b2de17449b..49eab360d5d4 100644 --- a/include/linux/dm-ioctl.h +++ b/include/linux/dm-ioctl.h | |||
| @@ -11,6 +11,7 @@ | |||
| 11 | #include <linux/types.h> | 11 | #include <linux/types.h> |
| 12 | 12 | ||
| 13 | #define DM_DIR "mapper" /* Slashes not supported */ | 13 | #define DM_DIR "mapper" /* Slashes not supported */ |
| 14 | #define DM_CONTROL_NODE "control" | ||
| 14 | #define DM_MAX_TYPE_NAME 16 | 15 | #define DM_MAX_TYPE_NAME 16 |
| 15 | #define DM_NAME_LEN 128 | 16 | #define DM_NAME_LEN 128 |
| 16 | #define DM_UUID_LEN 129 | 17 | #define DM_UUID_LEN 129 |
diff --git a/include/linux/miscdevice.h b/include/linux/miscdevice.h index f6c9b7dcb9fd..bafffc737903 100644 --- a/include/linux/miscdevice.h +++ b/include/linux/miscdevice.h | |||
| @@ -38,6 +38,7 @@ | |||
| 38 | #define KVM_MINOR 232 | 38 | #define KVM_MINOR 232 |
| 39 | #define BTRFS_MINOR 234 | 39 | #define BTRFS_MINOR 234 |
| 40 | #define AUTOFS_MINOR 235 | 40 | #define AUTOFS_MINOR 235 |
| 41 | #define MAPPER_CTRL_MINOR 236 | ||
| 41 | #define MISC_DYNAMIC_MINOR 255 | 42 | #define MISC_DYNAMIC_MINOR 255 |
| 42 | 43 | ||
| 43 | struct device; | 44 | struct device; |
