mirror of
https://github.com/torvalds/linux.git
synced 2026-05-05 15:02:40 -04:00
block: switch ->getgeo() to struct gendisk
Instances are happier that way and it makes more sense anyway - the only part of the result that is related to partition we are given is the start sector, and that has been filled in by the caller. Everything else is a function of the disk. Only one instance (DASD) is ever looking at anything other than bdev->bd_disk and that one is trivial to adjust. Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Acked-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@@ -942,11 +942,11 @@ static void rnbd_client_release(struct gendisk *gen)
|
||||
rnbd_clt_put_dev(dev);
|
||||
}
|
||||
|
||||
static int rnbd_client_getgeo(struct block_device *block_device,
|
||||
static int rnbd_client_getgeo(struct gendisk *disk,
|
||||
struct hd_geometry *geo)
|
||||
{
|
||||
u64 size;
|
||||
struct rnbd_clt_dev *dev = block_device->bd_disk->private_data;
|
||||
struct rnbd_clt_dev *dev = disk->private_data;
|
||||
struct queue_limits *limit = &dev->queue->limits;
|
||||
|
||||
size = dev->size * (limit->logical_block_size / SECTOR_SIZE);
|
||||
|
||||
Reference in New Issue
Block a user