diff mbox series

[v2,4/5] drivers/nvme/host/core.c: Convert to use set_capacity_revalidate_and_notify

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

Commit Message

Singh, Balbir Feb. 25, 2020, 8:01 p.m. UTC
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(-)

Comments

Sagi Grimberg Feb. 25, 2020, 8:24 p.m. UTC | #1
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Keith Busch Feb. 26, 2020, 6:08 p.m. UTC | #2
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>
Singh, Balbir Feb. 27, 2020, 10:31 p.m. UTC | #3
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 mbox series

Patch

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);