Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp4043728ybv; Tue, 25 Feb 2020 12:03:07 -0800 (PST) X-Google-Smtp-Source: APXvYqxz4iH4HWDlTNu20Kvq4GK64GyaOP9/OUjUY2rAqfznPml8hViwhHCkZauj0fldbH8guzi/ X-Received: by 2002:a05:6808:8fc:: with SMTP id d28mr492421oic.152.1582660987827; Tue, 25 Feb 2020 12:03:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582660987; cv=none; d=google.com; s=arc-20160816; b=V1NjOOvAhPP6Y7E14Rjcd+WNdF36wxlCgkrtpSkMDgwz1jMjjPo/r5SrLEGOrVFUjl K1Op6GmZD0jz9eLFIzK8QcAzWfN1azheYpJu0bvwHYNaWkE/L25+DbAGWqjmSN2rQfDc wWmjRT7zVLebgqL9Urgdsc+8bJdtQdqxAd2i/oXZ9Fd2Y2sSSa5qgQ8o1VDf+TIFQEaO /DdI4ELStIU3f5AyWcRCAEyz7NrfjgiuOjOp6GnrIIIyWEHudXZhIgStTTMPyAtSeG1+ TgREW9OQexMy6wucbZD8lvclqx8618IaG/2RBx90DvTn4iNmVmFdDGgYq5dgSgSQanCD 3WKQ== 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=jP+K9wLSlc6k+A2KTK2WjyFkweU0OvUvyEHXcdSRkdRTc+aG3HakISONqgV706GMf7 d6b1mw+Q5l/uEHBvDj0X2z6i+2p9Vih6/yglaQEwS7D6ad7XcyrfU4wS6daU8B7qpRYw f4zHSw8cBvixPlOI3V8FNGiph04Mx6LRCmdLVPNdSUoxehG4Y+fvYYgiNy4m53jqUTAc H3ifDi0mLKwM3Y/VaQwhQ2FMXJZjtjgSs3XwSmFX6V7VF9hd1+7MvFL/OiavdPgakH7m vHaWLht0WvQs43vhxoyRGCrANtuEN2Imj3RNUmLCw2se70RG+gSE6zxUcBNdk9EZ8BFo Qetw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=Qf+LGa3v; 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 x2si117572oie.56.2020.02.25.12.02.54; Tue, 25 Feb 2020 12:03:07 -0800 (PST) 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=Qf+LGa3v; 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 S1731630AbgBYUCS (ORCPT + 99 others); Tue, 25 Feb 2020 15:02:18 -0500 Received: from smtp-fw-9101.amazon.com ([207.171.184.25]:16699 "EHLO smtp-fw-9101.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731480AbgBYUCR (ORCPT ); Tue, 25 Feb 2020 15:02:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1582660937; x=1614196937; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=cWa6Fn7t0zpgUPTzyy7cZ2J7YPrWlvJCca1owelSg8I=; b=Qf+LGa3vsYgn342XorIdZGTC3jMFPjjCaeD99AWOl6C+kOCwLeqAahSO x0ajxIlgdbyFSHxU++u4zo7HW+Lq2JGfb7cpDPL2Ssf25LNOhq7Wq6zJg 9K290JmJBVqjMblEb7f6l5HimlE+/CqCmJL6wsYNvcVMbi0GWeNC968HX E=; IronPort-SDR: 0CTfqoGrztyFkxdWl7N+5xyPS/L7yzb0LCX1wGufvVj4n5Lfie5aXLi34SDtZ1xsd6Elp+FXKS Vw9pMSA3ejrg== X-IronPort-AV: E=Sophos;i="5.70,485,1574121600"; d="scan'208";a="19066438" 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; 25 Feb 2020 20:02:14 +0000 Received: from EX13MTAUWB001.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 23DF6A2E94; Tue, 25 Feb 2020 20:02:11 +0000 (UTC) Received: from EX13D01UWB003.ant.amazon.com (10.43.161.94) by EX13MTAUWB001.ant.amazon.com (10.43.161.207) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Tue, 25 Feb 2020 20:01:42 +0000 Received: from EX13MTAUWC001.ant.amazon.com (10.43.162.135) by EX13d01UWB003.ant.amazon.com (10.43.161.94) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 25 Feb 2020 20:01:42 +0000 Received: from localhost (10.2.75.237) by mail-relay.amazon.com (10.43.162.232) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Tue, 25 Feb 2020 20:01:42 +0000 From: Balbir Singh To: , , CC: , , , , , Balbir Singh Subject: [PATCH v2 5/5] drivers/scsi/sd.c: Convert to use set_capacity_revalidate_and_notify Date: Tue, 25 Feb 2020 20:01:29 +0000 Message-ID: <20200225200129.6687-6-sblbir@amazon.com> X-Mailer: git-send-email 2.16.6 In-Reply-To: <20200225200129.6687-1-sblbir@amazon.com> References: <20200225200129.6687-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