Skip to content

Commit

Permalink
nvme: Convert to use set_capacity_revalidate_and_notify
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Balbir Singh authored and Jens Axboe committed Mar 18, 2020
1 parent 3cbc28b commit cb224c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/nvme/host/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit cb224c3

Please sign in to comment.