Message ID | 20200225200129.6687-5-sblbir@amazon.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Add support for block disk resize notification | expand |
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
On Tue, Feb 25, 2020 at 08:01:28PM +0000, Balbir Singh wrote: > 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> Patch looks fine. Please change the commit subject prefix to just "nvme:" to match the local style and for length constraints (the committer may do this if they want). Acked-by: Keith Busch <kbusch@kernel.org>
On Thu, 2020-02-27 at 03:08 +0900, Keith Busch wrote: > On Tue, Feb 25, 2020 at 08:01:28PM +0000, Balbir Singh wrote: > > 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> > > Patch looks fine. Please change the commit subject prefix to just "nvme:" > to match the local style and for length constraints (the committer may > do this if they want). > > Acked-by: Keith Busch <kbusch@kernel.org> Sure thanks! Yes, that makes sense. Balbir Singh.
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index ada59df642d2..4699388c5260 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -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);
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> --- drivers/nvme/host/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)