]> git.baikalelectronics.ru Git - kernel.git/commit
block: add a new revalidate_disk_size helper
authorChristoph Hellwig <hch@lst.de>
Tue, 1 Sep 2020 15:57:43 +0000 (17:57 +0200)
committerJens Axboe <axboe@kernel.dk>
Wed, 2 Sep 2020 14:00:07 +0000 (08:00 -0600)
commitc17e9129a4ec5d6c63f6b342838dd46626415eea
treed318f21ef0098e4ab6c7385bc99bc1b8c5a82f44
parentfc5c99aeff50269a908e960a628411965ce8567f
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>
drivers/block/rbd.c
drivers/block/rnbd/rnbd-clt.c
drivers/block/virtio_blk.c
drivers/block/zram/zram_drv.c
drivers/md/dm-raid.c
drivers/md/md-cluster.c
drivers/md/md-linear.c
drivers/md/md.c
fs/block_dev.c
include/linux/genhd.h