extended dev_t tidyups
Subsystems (4)
Hi Jens,
two small tidyups for the extended dev_t code. One removes a not necessary maksing of a variable that already contains the minor number, and the other removes some long obsolete debugging code.
PATCH 1/2 block: remove a pointless call to MINOR() in device_add_disk
blk_alloc_ext_minor already returns just a minor number, so no need to mask the high bits.
--- block/genhd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
block/genhd.c +1 -1
@@ -515,7 +515,7 @@ static void __device_add_disk(struct device *parent, struct gendisk *disk,return ; } disk->major =BLOCK_EXT_MAJOR ; - disk->first_minor =MINOR (ret); + disk->first_minor = ret; disk->flags |=GENHD_FL_EXT_DEVT ; }
Signature · 1 line
2.30.2
PATCH 2/2 block: remove CONFIG_DEBUG_BLOCK_EXT_DEVT
In reply to Christoph HellwigThis might have been a neat debug aid when the extended dev_t was added, but that time is long gone.
--- arch/riscv/configs/defconfig | 1 - arch/riscv/configs/rv32_defconfig | 1 - block/genhd.c | 43 +++---------------------------- init/do_mounts.c | 4 --- lib/Kconfig.debug | 27 ------------------- 5 files changed, 4 insertions(+), 72 deletions(-)
arch/riscv/configs/defconfig +0 -1
@@ -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
arch/riscv/configs/rv32_defconfig +0 -1
@@ -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
block/genhd.c +4 -39
58 lines not on this page · raw message
init/do_mounts.c +0 -4
@@ -432,10 +432,6 @@ void __init mount_block_root(char *name, int flags)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 )) {
lib/Kconfig.debug +0 -27
@@ -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
Signature · 1 line
2.30.2
Jens Axboe
maintainerQuoted 6 lines · Christoph Hellwig
Hi Jens,
two small tidyups for the extended
dev_tcode. One removes a not necessary maksing of a variable that already contains the minor number, and the other removes some long obsolete debugging code.
Applied - did 1/2 manually, doesn't seem to sit after the add_disk() error handling changes.
Signature · 1 line
Jens Axboe