block: store a gendisk in struct parsed_partitions
authorChristoph Hellwig <hch@lst.de>
Tue, 10 Aug 2021 15:45:09 +0000 (17:45 +0200)
committerJens Axboe <axboe@kernel.dk>
Thu, 12 Aug 2021 16:31:35 +0000 (10:31 -0600)
commita08aa9bccdc282b5e8d133bf8c239473f057b464
treebacbfd0d8f42786aed2fff06103c78aa3a98b3df
parent50b4aecfbbb09869db967e4a26212a47e10c0088
block: store a gendisk in struct parsed_partitions

Partition scanning only happens on the whole device, so pass a
struct gendisk instead of the whole device block_device to the scanners.
This allows to simplify printing the device name in various places as the
disk name is available in disk->name.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Stefan Haberland <sth@linux.ibm.com>
Link: https://lore.kernel.org/r/20210810154512.1809898-2-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
14 files changed:
block/partitions/acorn.c
block/partitions/aix.c
block/partitions/amiga.c
block/partitions/atari.c
block/partitions/check.h
block/partitions/cmdline.c
block/partitions/core.c
block/partitions/efi.c
block/partitions/ibm.c
block/partitions/ldm.c
block/partitions/mac.c
block/partitions/msdos.c
block/partitions/sgi.c
block/partitions/sun.c