Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp1324836ybh; Thu, 12 Mar 2020 22:31:54 -0700 (PDT) X-Google-Smtp-Source: ADFU+vv8GLoYlIt/5jGURWJX22dDVVR/GlyJoITu6NAXNn5WC4jlKgINVjDAMHCiFtQpA0TokGnm X-Received: by 2002:a9d:6348:: with SMTP id y8mr9503183otk.347.1584077514719; Thu, 12 Mar 2020 22:31:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584077514; cv=none; d=google.com; s=arc-20160816; b=JFMgM2z+oJfb+BwwmiauL1UqcxmwStB2CzvuTc8lnisntBS+2kdzetm/3kPyXVCWLG IIBMwxQLmQc04TB7QEd6nBaxOHy9bL42jwrsa+KSV5c8xXjx7k+jXSPvLvUlWIWDxsFu lxt+HZbrEwSThyzuZ8zyL7tfe5OoecPnG64jtax8MzoMjMXpDDiw5zJIU/PIjlfQfNZh OlPT8x3zbFitL4nwhV1NuH37N0XIA7p1foCT0DunEMOWOwCu86L7ObBd708gvD4aG1kY lglf5sq51GUBTTvqt3EVVcQDhBmGc26LDAj9I+81miPdc49Jx2JMl+t33KLcGrUegTM8 03qA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:ironport-sdr:dkim-signature; bh=sheCncO47foSjn343rY+YmFhn3FyURF9m0Nn5oF+5ho=; b=RCGd1Sm77ei7O1Kr2YSXnKTJ84O4uk8beZz/0b0yZWWPyS8bxakh0eOtLPtbOubrJf nXbgFaT7ziYx5NoC90MW3e6/5212HDksDS6JCWCaw6CFzmypcsi4kh9pl8m7xf5YK0hF e1l0mXYSAdALj45eL1vQj93+tGCW3NaJzqYyovt1FugxuFEK7K0KHuSKnBcr4ZDxOqNR Gyg18qR6ANe/McUgdWjxyNJK1EE9wH7mC8Tec6hE3Ddef/RcSyWML1Qdz9hNJC8JzNo6 HshqPJsAIZafDAUadVYhSECZKwdZKbN1FoZV9vjl0FzlS5DppwyH1uhbdPYpblLTY/tK DiMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=FNpuBXCI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 34si4158802otv.21.2020.03.12.22.31.42; Thu, 12 Mar 2020 22:31:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=FNpuBXCI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726621AbgCMFa4 (ORCPT + 99 others); Fri, 13 Mar 2020 01:30:56 -0400 Received: from smtp-fw-9101.amazon.com ([207.171.184.25]:51457 "EHLO smtp-fw-9101.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725535AbgCMFaz (ORCPT ); Fri, 13 Mar 2020 01:30:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1584077455; x=1615613455; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=sheCncO47foSjn343rY+YmFhn3FyURF9m0Nn5oF+5ho=; b=FNpuBXCIKqkzV8Empyf3j31cKCDcQ+ubLNu+Ug6ZbSiXMxOWeXs0koB7 YwbsYVo2hEsJAhPA/mTbCa3jwFQa2A+G+q+Xl80MTqMvqfcVLASD778ZW Fe6Vb4rKhncNv/LeKLHNwXlTZbtJ8zm04KOmT28e3x3IzFSH5frSKs+m9 E=; IronPort-SDR: 9gaw9sXJrKVuWDZnU5bRFmMyI20SoSpILNYqSHO+6sKo+89mzwDoId2O8HsfOS4h51EWt9orbL prdoxDmnV0zg== X-IronPort-AV: E=Sophos;i="5.70,547,1574121600"; d="scan'208";a="22603236" Received: from sea32-co-svc-lb4-vlan3.sea.corp.amazon.com (HELO email-inbound-relay-1d-38ae4ad2.us-east-1.amazon.com) ([10.47.23.38]) by smtp-border-fw-out-9101.sea19.amazon.com with ESMTP; 13 Mar 2020 05:30:51 +0000 Received: from EX13MTAUWA001.ant.amazon.com (iad55-ws-svc-p15-lb9-vlan3.iad.amazon.com [10.40.159.166]) by email-inbound-relay-1d-38ae4ad2.us-east-1.amazon.com (Postfix) with ESMTPS id DAFD8A2137; Fri, 13 Mar 2020 05:30:48 +0000 (UTC) Received: from EX13D01UWA004.ant.amazon.com (10.43.160.99) by EX13MTAUWA001.ant.amazon.com (10.43.160.58) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Fri, 13 Mar 2020 05:30:19 +0000 Received: from EX13MTAUWA001.ant.amazon.com (10.43.160.58) by EX13d01UWA004.ant.amazon.com (10.43.160.99) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 13 Mar 2020 05:30:18 +0000 Received: from localhost (10.2.75.237) by mail-relay.amazon.com (10.43.160.118) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Fri, 13 Mar 2020 05:30:18 +0000 From: Balbir Singh To: , , CC: , , , "Balbir Singh" Subject: [PATCH v3 4/5] nvme: Convert to use set_capacity_revalidate_and_notify Date: Fri, 13 Mar 2020 05:30:08 +0000 Message-ID: <20200313053009.19866-5-sblbir@amazon.com> X-Mailer: git-send-email 2.16.6 In-Reply-To: <20200313053009.19866-1-sblbir@amazon.com> References: <20200313053009.19866-1-sblbir@amazon.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Acked-by: Keith Busch Reviewed-by: Sagi Grimberg --- drivers/nvme/host/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index a4d8c90ee7cc..41ad07f6a564 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); -- 2.16.6