Commit cb224c3a authored by Balbir Singh's avatar Balbir Singh Committed by Jens Axboe

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: default avatarBalbir Singh <sblbir@amazon.com>
Reviewed-by: default avatarSagi Grimberg <sagi@grimberg.me>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Acked-by: default avatarKeith Busch <kbusch@kernel.org>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 3cbc28bb
...@@ -1810,7 +1810,7 @@ static void nvme_update_disk_info(struct gendisk *disk, ...@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment