nvme: Convert to use set_capacity_revalidate_and_notify

block/genhd provides set_capacity_revalidate_and_notify() for
sending RESIZE notifications via uevents. This notification is
newly added to NVME devices

Signed-off-by: Balbir Singh <sblbir@amazon.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Acked-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
Balbir Singh 2020-03-13 05:30:08 +00:00 committed by Jens Axboe
parent 3cbc28bb90
commit cb224c3af4

View File

@ -1810,7 +1810,7 @@ static void nvme_update_disk_info(struct gendisk *disk,
ns->lba_shift > PAGE_SHIFT) ns->lba_shift > PAGE_SHIFT)
capacity = 0; capacity = 0;
set_capacity(disk, capacity); set_capacity_revalidate_and_notify(disk, capacity, false);
nvme_config_discard(disk, ns); nvme_config_discard(disk, ns);
nvme_config_write_zeroes(disk, ns); nvme_config_write_zeroes(disk, ns);