diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index 3971554ca0d0..f6a77b9a9d26 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -837,9 +837,6 @@ dis_ucode_ldr [X86] Disable the microcode loader. - dm= [DM] Allows early creation of a device-mapper device. - See Documentation/device-mapper/boot.txt. - dma_debug=off If the kernel is compiled with DMA_API_DEBUG support, this option disables the debugging code at boot. diff --git a/Documentation/device-mapper/boot.txt b/Documentation/device-mapper/boot.txt deleted file mode 100644 index adcaad5e5e32..000000000000 --- a/Documentation/device-mapper/boot.txt +++ /dev/null @@ -1,42 +0,0 @@ -Boot time creation of mapped devices -=================================== - -It is possible to configure a device mapper device to act as the root -device for your system in two ways. - -The first is to build an initial ramdisk which boots to a minimal -userspace which configures the device, then pivot_root(8) in to it. - -For simple device mapper configurations, it is possible to boot directly -using the following kernel command line: - -dm=" ,table line 1,...,table line n" - -name = the name to associate with the device - after boot, udev, if used, will use that name to label - the device node. -uuid = may be 'none' or the UUID desired for the device. -ro = may be "ro" or "rw". If "ro", the device and device table will be - marked read-only. - -Each table line may be as normal when using the dmsetup tool except for -two variations: -1. Any use of commas will be interpreted as a newline -2. Quotation marks cannot be escaped and cannot be used without - terminating the dm= argument. - -Unless renamed by udev, the device node created will be dm-0 as the -first minor number for the device-mapper is used during early creation. - -Example -======= - -- Booting to a linear array made up of user-mode linux block devices: - - dm="lroot none 0, 0 4096 linear 98:16 0, 4096 4096 linear 98:32 0" \ - root=/dev/dm-0 - -Will boot to a rw dm-linear target of 8192 sectors split across two -block devices identified by their major:minor numbers. After boot, udev -will rename this target to /dev/mapper/lroot (depending on the rules). -No uuid was assigned. diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c index 787afba77b2e..ca948155191a 100644 --- a/drivers/md/dm-ioctl.c +++ b/drivers/md/dm-ioctl.c @@ -1986,45 +1986,6 @@ void dm_interface_exit(void) dm_hash_exit(); } - -/** - * dm_ioctl_export - Permanently export a mapped device via the ioctl interface - * @md: Pointer to mapped_device - * @name: Buffer (size DM_NAME_LEN) for name - * @uuid: Buffer (size DM_UUID_LEN) for uuid or NULL if not desired - */ -int dm_ioctl_export(struct mapped_device *md, const char *name, - const char *uuid) -{ - int r = 0; - struct hash_cell *hc; - - if (!md) { - r = -ENXIO; - goto out; - } - - /* The name and uuid can only be set once. */ - mutex_lock(&dm_hash_cells_mutex); - hc = dm_get_mdptr(md); - mutex_unlock(&dm_hash_cells_mutex); - if (hc) { - DMERR("%s: already exported", dm_device_name(md)); - r = -ENXIO; - goto out; - } - - r = dm_hash_insert(name, uuid, md); - if (r) { - DMERR("%s: could not bind to '%s'", dm_device_name(md), name); - goto out; - } - - /* Let udev know we've changed. */ - dm_kobject_uevent(md, KOBJ_CHANGE, dm_get_event_nr(md)); -out: - return r; -} /** * dm_copy_name_and_uuid - Copy mapped device name & uuid into supplied buffers * @md: Pointer to mapped_device diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c index 6916aa9535da..49d20c910e00 100644 --- a/drivers/md/dm-table.c +++ b/drivers/md/dm-table.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include #include diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h index 0f5f4915b3ab..91a063a1f3b3 100644 --- a/include/linux/device-mapper.h +++ b/include/linux/device-mapper.h @@ -430,12 +430,6 @@ void dm_put(struct mapped_device *md); void dm_set_mdptr(struct mapped_device *md, void *ptr); void *dm_get_mdptr(struct mapped_device *md); -/* - * Export the device via the ioctl interface (uses mdptr). - */ -int dm_ioctl_export(struct mapped_device *md, const char *name, - const char *uuid); - /* * A device can still be used while suspended, but I/O is deferred. */ diff --git a/init/Makefile b/init/Makefile index 0320e1a0705d..a04f1c18b58c 100644 --- a/init/Makefile +++ b/init/Makefile @@ -18,7 +18,6 @@ mounts-y := do_mounts.o mounts-$(CONFIG_BLK_DEV_RAM) += do_mounts_rd.o mounts-$(CONFIG_BLK_DEV_INITRD) += do_mounts_initrd.o mounts-$(CONFIG_BLK_DEV_MD) += do_mounts_md.o -mounts-$(CONFIG_BLK_DEV_DM) += do_mounts_dm.o # dependencies on generated files need to be listed explicitly $(obj)/version.o: include/generated/compile.h diff --git a/init/do_mounts.c b/init/do_mounts.c index 27826694ea26..7cf4f6dafd5f 100644 --- a/init/do_mounts.c +++ b/init/do_mounts.c @@ -565,7 +565,6 @@ void __init prepare_namespace(void) wait_for_device_probe(); md_run_setup(); - dm_run_setup(); if (saved_root_name[0]) { root_device_name = saved_root_name; diff --git a/init/do_mounts.h b/init/do_mounts.h index cd201124714b..5b05c8f93f47 100644 --- a/init/do_mounts.h +++ b/init/do_mounts.h @@ -61,13 +61,3 @@ void md_run_setup(void); static inline void md_run_setup(void) {} #endif - -#ifdef CONFIG_BLK_DEV_DM - -void dm_run_setup(void); - -#else - -static inline void dm_run_setup(void) {} - -#endif