Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp1324612ybh; Thu, 12 Mar 2020 22:31:33 -0700 (PDT) X-Google-Smtp-Source: ADFU+vune/uCtwT1nxknqYX8Rd+P3k8DaytBG8oD5Qt6NXoztwqCK+RBmVIGxBW9p1hbn3ntLH0o X-Received: by 2002:aca:c78d:: with SMTP id x135mr3137716oif.51.1584077493687; Thu, 12 Mar 2020 22:31:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584077493; cv=none; d=google.com; s=arc-20160816; b=vIyH4bQ4UbJ/PR9siHfHy6sNMA9gTipMzO9js5L7RhFHJmkf6vHcFcxDxAduyTNLbN HNKQqujuPE41kaldhhBXkO0jWsQUZBS3dCapZkg774cUdOlYEo3M6Y67J8J1IyQYBaC0 7EwITjOpgVVHP0zMaPvQp5PH302I8WhdLiijmZpFqiWuHznS6aBbUNp8jjn7jZ+dJtxI x2932YyN2gDf0Rs6mc/QsVPMFg/f+5E2QoAV5W6/UygyTmXP8LJ9Q5DgsbK8qJaeEvGA kVQxZ/HKccAx9TDNidrR/ofGqBWgWwT8eQ/rX3RnZRo8V6UmrRaZJz9ezQDASLSVxWrC NRzw== 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=cWa6Fn7t0zpgUPTzyy7cZ2J7YPrWlvJCca1owelSg8I=; b=LQv3p+r66Ap8YDyEntDFLXzvrbvYD+OIaD8bLWj0rfSJ6RJ8c+8/dJtDhFwJGBBXx9 f+ipCU6GqhZgmt5PJ1cVF0TR9m3+eqWZi3JNQA3UvpJIITombEl6O3OdaiYrxZHMQa4d Mxeea2MkeOlysXaFyCEdc8u/+qRZhDrSnAoJ3i7VR9TRvD0XF4aP+8MlxUW73fbpVxnI tMzOpiXxj7C8EeyvGhq1fpajSIMbCQ7bxK3xzsaq4UTp3NaZnvjg3pDS7Hn1kXMz4O+g Q/8vhg6hvrI1WpXX4rR7hLqYx9y6W3P6z9/FvlCln1lPcVZoVolAWcqADwfgj3biGjEX WP5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=JfyCqGN1; 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 c19si203143ots.118.2020.03.12.22.31.21; Thu, 12 Mar 2020 22:31:33 -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=JfyCqGN1; 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 S1726578AbgCMFaw (ORCPT + 99 others); Fri, 13 Mar 2020 01:30:52 -0400 Received: from smtp-fw-2101.amazon.com ([72.21.196.25]:46844 "EHLO smtp-fw-2101.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725535AbgCMFav (ORCPT ); Fri, 13 Mar 2020 01:30:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1584077452; x=1615613452; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=cWa6Fn7t0zpgUPTzyy7cZ2J7YPrWlvJCca1owelSg8I=; b=JfyCqGN1VegCRjZkw4UzzRdKAEHGomObZcZR5vAyIy7gqvffafASP1Yw fLDefnavOMTGQJmSbE+6EgYRtume2f5rDnOrxRWwRA4RgkZ301agyQ3O7 285/krbfIZJwMY90djluK1gs4vQLcDHFskc+IVAvk4J7B+pOTt2Io0DiO w=; IronPort-SDR: Onar0HjUUCMoIfFoSNbSPUmwDc3OK7NGLvHV8VHla/RGs5aX9kzqgF29nvMi6nMozplWJTNQSV T9tZzeWVjXqw== X-IronPort-AV: E=Sophos;i="5.70,547,1574121600"; d="scan'208";a="21324228" Received: from iad12-co-svc-p1-lb1-vlan2.amazon.com (HELO email-inbound-relay-1d-37fd6b3d.us-east-1.amazon.com) ([10.43.8.2]) by smtp-border-fw-out-2101.iad2.amazon.com with ESMTP; 13 Mar 2020 05:30:51 +0000 Received: from EX13MTAUWA001.ant.amazon.com (iad55-ws-svc-p15-lb9-vlan2.iad.amazon.com [10.40.159.162]) by email-inbound-relay-1d-37fd6b3d.us-east-1.amazon.com (Postfix) with ESMTPS id DB3E728338F; Fri, 13 Mar 2020 05:30:48 +0000 (UTC) Received: from EX13D01UWA003.ant.amazon.com (10.43.160.107) 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 EX13d01UWA003.ant.amazon.com (10.43.160.107) 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 5/5] scsi: Convert to use set_capacity_revalidate_and_notify Date: Fri, 13 Mar 2020 05:30:09 +0000 Message-ID: <20200313053009.19866-6-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 scsi sd. Signed-off-by: Balbir Singh --- drivers/scsi/sd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 8ca9299ffd36..707f47c0ec98 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -3187,7 +3187,8 @@ static int sd_revalidate_disk(struct gendisk *disk) sdkp->first_scan = 0; - set_capacity(disk, logical_to_sectors(sdp, sdkp->capacity)); + set_capacity_revalidate_and_notify(disk, + logical_to_sectors(sdp, sdkp->capacity), false); sd_config_write_same(sdkp); kfree(buffer); -- 2.16.6