]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
block: remove CONFIG_DEBUG_BLOCK_EXT_DEVT
authorChristoph Hellwig <hch@lst.de>
Tue, 24 Aug 2021 07:52:16 +0000 (09:52 +0200)
committerJens Axboe <axboe@kernel.dk>
Tue, 24 Aug 2021 12:42:40 +0000 (06:42 -0600)
This might have been a neat debug aid when the extended dev_t was
added, but that time is long gone.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20210824075216.1179406-3-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
arch/riscv/configs/defconfig
arch/riscv/configs/rv32_defconfig
block/genhd.c
init/do_mounts.c
lib/Kconfig.debug

index 1f2be234b11cdb9e849a0e7cb9916df323925d68..bc68231a8fb74b5addcde29f258ffa5344651d60 100644 (file)
@@ -132,7 +132,6 @@ CONFIG_DEBUG_PLIST=y
 CONFIG_DEBUG_SG=y
 # CONFIG_RCU_TRACE is not set
 CONFIG_RCU_EQS_DEBUG=y
-CONFIG_DEBUG_BLOCK_EXT_DEVT=y
 # CONFIG_FTRACE is not set
 # CONFIG_RUNTIME_TESTING_MENU is not set
 CONFIG_MEMTEST=y
index 8dd02b842fef8cb2f3152b383270c7da020cea3e..434ef5b645998e926c81a7a1f01728bc131f3cde 100644 (file)
@@ -127,7 +127,6 @@ CONFIG_DEBUG_PLIST=y
 CONFIG_DEBUG_SG=y
 # CONFIG_RCU_TRACE is not set
 CONFIG_RCU_EQS_DEBUG=y
-CONFIG_DEBUG_BLOCK_EXT_DEVT=y
 # CONFIG_FTRACE is not set
 # CONFIG_RUNTIME_TESTING_MENU is not set
 CONFIG_MEMTEST=y
index f13b7eb0238b4832813154d4faaf04ea9184853b..6a5b65c86c4b91c3d38ed45165b2c7470c3307c7 100644 (file)
@@ -313,54 +313,19 @@ void unregister_blkdev(unsigned int major, const char *name)
 
 EXPORT_SYMBOL(unregister_blkdev);
 
-/**
- * blk_mangle_minor - scatter minor numbers apart
- * @minor: minor number to mangle
- *
- * Scatter consecutively allocated @minor number apart if MANGLE_DEVT
- * is enabled.  Mangling twice gives the original value.
- *
- * RETURNS:
- * Mangled value.
- *
- * CONTEXT:
- * Don't care.
- */
-static int blk_mangle_minor(int minor)
-{
-#ifdef CONFIG_DEBUG_BLOCK_EXT_DEVT
-       int i;
-
-       for (i = 0; i < MINORBITS / 2; i++) {
-               int low = minor & (1 << i);
-               int high = minor & (1 << (MINORBITS - 1 - i));
-               int distance = MINORBITS - 1 - 2 * i;
-
-               minor ^= low | high;    /* clear both bits */
-               low <<= distance;       /* swap the positions */
-               high >>= distance;
-               minor |= low | high;    /* and set */
-       }
-#endif
-       return minor;
-}
-
 int blk_alloc_ext_minor(void)
 {
        int idx;
 
        idx = ida_alloc_range(&ext_devt_ida, 0, NR_EXT_DEVT, GFP_KERNEL);
-       if (idx < 0) {
-               if (idx == -ENOSPC)
-                       return -EBUSY;
-               return idx;
-       }
-       return blk_mangle_minor(idx);
+       if (idx == -ENOSPC)
+               return -EBUSY;
+       return idx;
 }
 
 void blk_free_ext_minor(unsigned int minor)
 {
-       ida_free(&ext_devt_ida, blk_mangle_minor(minor));
+       ida_free(&ext_devt_ida, minor);
 }
 
 static char *bdevt_str(dev_t devt, char *buf)
index 74aede860de7396f157257491b00f01a03a1bdfb..b691d6891e5160609b15afd75b865f72a467f7d9 100644 (file)
@@ -432,10 +432,6 @@ retry:
                printk("Please append a correct \"root=\" boot option; here are the available partitions:\n");
 
                printk_all_partitions();
-#ifdef CONFIG_DEBUG_BLOCK_EXT_DEVT
-               printk("DEBUG_BLOCK_EXT_DEVT is enabled, you need to specify "
-                      "explicit textual name for \"root=\" boot option.\n");
-#endif
                panic("VFS: Unable to mount root fs on %s", b);
        }
        if (!(flags & SB_RDONLY)) {
index 5ddd575159fb82f2f9d0bc95b7b162f2b47d8f5f..22a4aa51bd583013b80e1daac6012abefe05532b 100644 (file)
@@ -1679,33 +1679,6 @@ config DEBUG_WQ_FORCE_RR_CPU
          feature by default.  When enabled, memory and cache locality will
          be impacted.
 
-config DEBUG_BLOCK_EXT_DEVT
-       bool "Force extended block device numbers and spread them"
-       depends on DEBUG_KERNEL
-       depends on BLOCK
-       default n
-       help
-         BIG FAT WARNING: ENABLING THIS OPTION MIGHT BREAK BOOTING ON
-         SOME DISTRIBUTIONS.  DO NOT ENABLE THIS UNLESS YOU KNOW WHAT
-         YOU ARE DOING.  Distros, please enable this and fix whatever
-         is broken.
-
-         Conventionally, block device numbers are allocated from
-         predetermined contiguous area.  However, extended block area
-         may introduce non-contiguous block device numbers.  This
-         option forces most block device numbers to be allocated from
-         the extended space and spreads them to discover kernel or
-         userland code paths which assume predetermined contiguous
-         device number allocation.
-
-         Note that turning on this debug option shuffles all the
-         device numbers for all IDE and SCSI devices including libata
-         ones, so root partition specified using device number
-         directly (via rdev or root=MAJ:MIN) won't work anymore.
-         Textual device names (root=/dev/sdXn) will continue to work.
-
-         Say N if you are unsure.
-
 config CPU_HOTPLUG_STATE_CONTROL
        bool "Enable CPU hotplug state control"
        depends on DEBUG_KERNEL