linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* simplify gendisk lookup and remove struct block_device aliases v4
@ 2020-10-29 14:58 Christoph Hellwig
  2020-10-29 14:58 ` [PATCH 01/18] block: cleanup del_gendisk a bit Christoph Hellwig
                   ` (19 more replies)
  0 siblings, 20 replies; 31+ messages in thread
From: Christoph Hellwig @ 2020-10-29 14:58 UTC (permalink / raw)
  To: Jens Axboe
  Cc: Greg Kroah-Hartman, Rafael J. Wysocki, Denis Efremov,
	David S. Miller, Song Liu, Al Viro, Finn Thain, Michael Schmitz,
	linux-block, linux-kernel, linux-ide, linux-raid, linux-scsi,
	linux-m68k

Hi all,

this series removes the annoying struct block_device aliases, which can
happen for a bunch of old floppy drivers (and z2ram).  In that case
multiple struct block device instances for different dev_t's can point
to the same gendisk, without being partitions.  The cause for that
is the probe/get callback registered through blk_register_regions.

This series removes blk_register_region entirely, splitting it it into
a simple xarray lookup of registered gendisks, and a probe callback
stored in the major_names array that can be used for modprobe overrides
or creating devices on demands when no gendisk is found.  The old
remapping is gone entirely, and instead the 4 remaining drivers just
register a gendisk for each operating mode.  In case of the two drivers
that have lots of aliases that is done on-demand using the new probe
callback, while for the other two I simply register all at probe time
to keep things simple.

Note that the m68k drivers are compile tested only.

Changes since v3:
 - keep kobj_map for char dev lookup for now, as the testbot found
   some very strange and unexplained regressions, so I'll get back to
   this later separately
 - fix a commit message typo

Changes since v2:
 - fix a wrong variable passed to ERR_PTR in the floppy driver
 - slightly adjust the del_gendisk cleanups to prepare for the next
   series touching this area

Changes since v1:
 - add back a missing kobject_put in the cdev code
 - improve the xarray delete loops


^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2020-11-11 16:18 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-29 14:58 simplify gendisk lookup and remove struct block_device aliases v4 Christoph Hellwig
2020-10-29 14:58 ` [PATCH 01/18] block: cleanup del_gendisk a bit Christoph Hellwig
2020-10-29 14:58 ` [PATCH 02/18] block: open code kobj_map into in block/genhd.c Christoph Hellwig
2020-10-29 19:22   ` Greg Kroah-Hartman
2020-10-29 19:32     ` Christoph Hellwig
2020-10-30 10:40       ` Greg Kroah-Hartman
2020-10-30 10:49         ` Geert Uytterhoeven
2020-10-30 11:06           ` Greg Kroah-Hartman
2020-10-31  8:53         ` Christoph Hellwig
2020-10-29 14:58 ` [PATCH 03/18] block: split block_class_lock Christoph Hellwig
2020-10-29 14:58 ` [PATCH 04/18] block: rework requesting modules for unclaimed devices Christoph Hellwig
2020-10-29 14:58 ` [PATCH 05/18] block: add an optional probe callback to major_names Christoph Hellwig
2020-10-29 14:58 ` [PATCH 06/18] ide: remove ide_{,un}register_region Christoph Hellwig
2020-10-29 14:58 ` [PATCH 07/18] swim: don't call blk_register_region Christoph Hellwig
2020-10-29 14:58 ` [PATCH 08/18] sd: use __register_blkdev to avoid a modprobe for an unregistered dev_t Christoph Hellwig
2020-10-30  2:13   ` Martin K. Petersen
2020-10-29 14:58 ` [PATCH 09/18] brd: use __register_blkdev to allocate devices on demand Christoph Hellwig
2020-10-29 14:58 ` [PATCH 10/18] loop: " Christoph Hellwig
2020-10-29 14:58 ` [PATCH 11/18] md: " Christoph Hellwig
2020-10-29 14:58 ` [PATCH 12/18] ide: switch to __register_blkdev for command set probing Christoph Hellwig
2020-10-29 14:58 ` [PATCH 13/18] floppy: use a separate gendisk for each media format Christoph Hellwig
2020-10-29 14:58 ` [PATCH 14/18] amiflop: use separate gendisks for Amiga vs MS-DOS mode Christoph Hellwig
2020-10-29 14:58 ` [PATCH 15/18] ataflop: use a separate gendisk for each media format Christoph Hellwig
2020-10-29 14:58 ` [PATCH 16/18] z2ram: reindent Christoph Hellwig
2020-10-29 14:58 ` [PATCH 17/18] z2ram: use separate gendisk for the different modes Christoph Hellwig
2020-10-30  0:11   ` [PATCH] z2ram: MODULE_LICENSE update and neatening Joe Perches
2020-10-30  1:01     ` James Bottomley
2020-10-30  1:23       ` Joe Perches
2020-10-29 14:58 ` [PATCH 18/18] block: switch gendisk lookup to a simple xarray Christoph Hellwig
2020-11-11  7:57 ` simplify gendisk lookup and remove struct block_device aliases v4 Christoph Hellwig
2020-11-11 16:17 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).