[Devel] [PATCH RH7 1/2] ploop: remove module param ploop_major as it can break everything
Pavel Tikhomirov
ptikhomirov at virtuozzo.com
Wed Sep 25 12:53:31 MSK 2019
For instance: in ploop_mod_init we register ploop_major and unregister
PLOOP_DEVICE_MAJOR, in MODULE_ALIAS_BLOCKDEV_MAJOR we can only use
PLOOP_DEVICE_MAJOR as it is set at compilation time, in
ploop_set_dm_crypt_bdev we also use PLOOP_DEVICE_MAJOR.
Signed-off-by: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
---
drivers/block/ploop/dev.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/block/ploop/dev.c b/drivers/block/ploop/dev.c
index b6cb408347d2..c65a99861548 100644
--- a/drivers/block/ploop/dev.c
+++ b/drivers/block/ploop/dev.c
@@ -5696,8 +5696,14 @@ static const struct file_operations proc_ploop_minor = {
module_param(ploop_max, int, 0);
MODULE_PARM_DESC(ploop_max, "Maximum number of ploop devices");
+/*
+ * Comment out ploop_major module parameter as we use both ploop_major and
+ * PLOOP_DEVICE_MAJOR interchangeably and we can't afford them to differ.
+ */
+/*
module_param(ploop_major, int, 0);
MODULE_PARM_DESC(ploop_major, "Major number of ploop device");
+*/
module_param(max_map_pages, int, 0644);
MODULE_PARM_DESC(ploop_max_map_pages, "Maximal amount of pages taken by map cache");
module_param(root_threshold, long, 0644);
--
2.21.0
More information about the Devel
mailing list