diff options
author | Balbir Singh <sblbir@amazon.com> | 2020-03-13 08:30:06 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-03-19 00:13:21 +0300 |
commit | 662155e2898dd1c3915e420378bb6c0826548e70 (patch) | |
tree | 44be98afee9c6b72f4050f50640b7ec4fddf840b /drivers/block | |
parent | e598a72faeb543599bdf0d930df3a71906404e6f (diff) | |
download | linux-662155e2898dd1c3915e420378bb6c0826548e70.tar.xz |
virtio_blk.c: Convert to use set_capacity_revalidate_and_notify
block/genhd provides set_capacity_revalidate_and_notify() for sending RESIZE
notifications via uevents.
Signed-off-by: Balbir Singh <sblbir@amazon.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/virtio_blk.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 54158766334b..c913ebb25a52 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -381,18 +381,15 @@ static void virtblk_update_capacity(struct virtio_blk *vblk, bool resize) cap_str_10, cap_str_2); - set_capacity(vblk->disk, capacity); + set_capacity_revalidate_and_notify(vblk->disk, capacity, true); } static void virtblk_config_changed_work(struct work_struct *work) { struct virtio_blk *vblk = container_of(work, struct virtio_blk, config_work); - char *envp[] = { "RESIZE=1", NULL }; virtblk_update_capacity(vblk, true); - revalidate_disk(vblk->disk); - kobject_uevent_env(&disk_to_dev(vblk->disk)->kobj, KOBJ_CHANGE, envp); } static void virtblk_config_changed(struct virtio_device *vdev) |