[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191223014056.17318-2-sblbir@amazon.com>
Date: Mon, 23 Dec 2019 01:40:53 +0000
From: Balbir Singh <sblbir@...zon.com>
To: <=linux-block@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<linux-nvme@...ts.infradead.org>
CC: <axboe@...nel.dk>, <mst@...hat.com>, <jejb@...ux.ibm.com>,
<hch@....de>, <ssomesh@...zon.com>,
Balbir Singh <sblbir@...zon.com>
Subject: [RFC PATCH 2/5] drivers/block/virtio_blk.c: Convert to use disk_set_capacity
block/genhd provides disk_set_capacity() for sending
RESIZE notifications via uevents.
Signed-off-by: Balbir Singh <sblbir@...zon.com>
---
drivers/block/virtio_blk.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
index fbbf18ac1d5d..9848c94a7eb4 100644
--- a/drivers/block/virtio_blk.c
+++ b/drivers/block/virtio_blk.c
@@ -479,18 +479,16 @@ static void virtblk_update_capacity(struct virtio_blk *vblk, bool resize)
cap_str_10,
cap_str_2);
- set_capacity(vblk->disk, capacity);
+ disk_set_capacity(vblk->disk, capacity);
}
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)
--
2.16.5
Powered by blists - more mailing lists