[Devel] [PATCH RHEL7 COMMIT] ploop: remove module param ploop_major as it can break everything

Konstantin Khorenko khorenko at virtuozzo.com
Mon Sep 30 11:59:28 MSK 2019


The commit is pushed to "branch-rh7-3.10.0-957.27.2.vz7.107.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-957.27.2.vz7.107.10
------>
commit 664f940223a962318999a9916656191767764123
Author: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
Date:   Mon Sep 30 11:59:26 2019 +0300

    ploop: remove module param ploop_major as it can break everything
    
    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);



More information about the Devel mailing list