nvme: Convert to use set_capacity_revalidate_and_notify
authorBalbir Singh <sblbir@amazon.com>
Fri, 13 Mar 2020 05:30:08 +0000 (05:30 +0000)
committerJens Axboe <axboe@kernel.dk>
Wed, 18 Mar 2020 21:13:21 +0000 (15:13 -0600)
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>
drivers/nvme/host/core.c

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