summaryrefslogtreecommitdiff
path: root/include/linux/genhd.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-09-01 18:57:43 +0300
committerJens Axboe <axboe@kernel.dk>2020-09-02 17:00:07 +0300
commit659e56ba864d37b7ee0a49cd432205b2a5ca815e (patch)
treed318f21ef0098e4ab6c7385bc99bc1b8c5a82f44 /include/linux/genhd.h
parentf4ad06f2bb8476548b08f89919ee65abc4e40212 (diff)
downloadlinux-659e56ba864d37b7ee0a49cd432205b2a5ca815e.tar.xz
block: add a new revalidate_disk_size helper
revalidate_disk is a relative awkward helper for driver use, as it first calls an optional driver method and then updates the block device size, while most callers either don't need the method call at all, or want to keep state between the caller and the called method. Add a revalidate_disk_size helper that just performs the update of the block device size from the gendisk one, and switch all drivers that do not implement ->revalidate_disk to use the new helper instead of revalidate_disk() Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Josef Bacik <josef@toxicpanda.com> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Acked-by: Song Liu <song@kernel.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/genhd.h')
-rw-r--r--include/linux/genhd.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/genhd.h b/include/linux/genhd.h
index 9ea2ca31c278..f76c8baf6b7d 100644
--- a/include/linux/genhd.h
+++ b/include/linux/genhd.h
@@ -371,6 +371,7 @@ int register_blkdev(unsigned int major, const char *name);
void unregister_blkdev(unsigned int major, const char *name);
int revalidate_disk(struct gendisk *disk);
+void revalidate_disk_size(struct gendisk *disk, bool verbose);
int check_disk_change(struct block_device *bdev);
int __invalidate_device(struct block_device *bdev, bool kill_dirty);
void bd_set_nr_sectors(struct block_device *bdev, sector_t sectors);