diff options
author | Christoph Hellwig <hch@lst.de> | 2021-11-22 14:06:22 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-11-29 14:38:35 +0100 |
commit | 1ebe2e5f9d68e94c524aba876f27b945669a7879 (patch) | |
tree | e0de8a0a5eb068a3de89c5cf346730ea9e1349b6 /drivers/block/rbd.c | |
parent | block: remove GENHD_FL_SUPPRESS_PARTITION_INFO (diff) | |
download | linux-1ebe2e5f9d68e94c524aba876f27b945669a7879.tar.xz linux-1ebe2e5f9d68e94c524aba876f27b945669a7879.zip |
block: remove GENHD_FL_EXT_DEVT
All modern drivers can support extra partitions using the extended
dev_t. In fact except for the ioctl method drivers never even see
partitions in normal operation.
So remove the GENHD_FL_EXT_DEVT and allow extra partitions for all
block devices that do support partitions, and require those that
do not support partitions to explicit disallow them using
GENHD_FL_NO_PART.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20211122130625.1136848-12-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block/rbd.c')
-rw-r--r-- | drivers/block/rbd.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 953fa134cd3d..8f140da1efe3 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -4924,12 +4924,10 @@ static int rbd_init_disk(struct rbd_device *rbd_dev) rbd_dev->dev_id); disk->major = rbd_dev->major; disk->first_minor = rbd_dev->minor; - if (single_major) { + if (single_major) disk->minors = (1 << RBD_SINGLE_MAJOR_PART_SHIFT); - disk->flags |= GENHD_FL_EXT_DEVT; - } else { + else disk->minors = RBD_MINORS_PER_MAJOR; - } disk->fops = &rbd_bd_ops; disk->private_data = rbd_dev; |