Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5904708ybl; Sun, 22 Dec 2019 17:42:16 -0800 (PST) X-Google-Smtp-Source: APXvYqyboDsF/O/BBU48N7EvMRLw3D0eMjgKe2YvjUPVNOmSYyq5efhRfN3vpaCCtalR1a9fb69z X-Received: by 2002:a9d:74c4:: with SMTP id a4mr30038914otl.119.1577065336212; Sun, 22 Dec 2019 17:42:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577065336; cv=none; d=google.com; s=arc-20160816; b=QOmjybkD4mzGdfyFVwrNK0I+RmplJ/1kPsvZScUxx+NUneCgEWnBdQcYWpy9jH9vUs t/ugFuGL0YWg8ezNwxXQTjV4YpPGFt82lp0DmJQJtiGN+GJuY6ldaG9uvylybCSCGXSw EjQfs6YzIQBSI/59kPjNO13eQ1OzBLyuVwRnLVv86wYYEZ0jz9ZBY0mdQxoW6lSnGxAs cql+ZEIITkWs410IZGwjBLK+TvHofiWTUToU2W4f8b4iOFy8dl3dfPLUCceOOofJDwRY yju1grpiabM7hlXD2qjfB75LT2Lqdz7EmIahuNhORyV+n6lCbuh3ag+vNh9enC4C8G8I 4FlA== 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=x51IhYE1QyMmY3UHAvxQPb23Eyep04ViD2uP480XSao=; b=uknShn5SppkRRliJyT5UkZBHl1sh3lgqNoETubfQrk7TSKsjky+AVnnGTuCAii1dlW TtPf22V1lC8AAXrUFWeog1r8cWZhqqy+7tMVI/jiYSDEjEL3kRmkJTaRzpkU22t1LhlK iyrHxSdF85nIdhZzPfjMKcP195U6BMoECKkCtBhPDosWnkZ0zjklODlac4q6dXEY63r4 xxC9QXSPzMcX38IFZmABY8MpigE1MMQ/PghhM+LYseD0UFw3umMTfa4g+0q66/7AKoMB Tm5a0F89xVdiUnMQq0t945yk/lkheTGwaxCXtPHZqzVQ0EnYGspUPvRKgy7heEaoZmHd 1SYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b="YxZiHG/W"; 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 l19si8326214oii.54.2019.12.22.17.42.05; Sun, 22 Dec 2019 17:42:16 -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="YxZiHG/W"; 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 S1726853AbfLWBl0 (ORCPT + 99 others); Sun, 22 Dec 2019 20:41:26 -0500 Received: from smtp-fw-6002.amazon.com ([52.95.49.90]:34696 "EHLO smtp-fw-6002.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726604AbfLWBlY (ORCPT ); Sun, 22 Dec 2019 20:41:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1577065285; x=1608601285; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=x51IhYE1QyMmY3UHAvxQPb23Eyep04ViD2uP480XSao=; b=YxZiHG/Wx421T38Nlg3CjeGNvlWh8mXbVXKFni6pfOQxu1Gnk8GGkxVD OnovRF2tDGbFM12BlOcoeGLhoRqwQnN2YFkeRfe+4Nzvj4H6gGb5/+M+H HbNzT7oekErqNHLD4U5sTxbdBuUHbAfVUNm14yXDQQM0MCOeE5WxTL13a U=; IronPort-SDR: u42+C2cWqXai1yZxQ5RHbMfHWMe45P1ZHZVjdw7UCnZe5/KJcLLskVMaz9YebLrkIktGlNlnPd F/lMiZ6/3Qyw== X-IronPort-AV: E=Sophos;i="5.69,345,1571702400"; d="scan'208";a="8788841" Received: from iad12-co-svc-p1-lb1-vlan3.amazon.com (HELO email-inbound-relay-1d-37fd6b3d.us-east-1.amazon.com) ([10.43.8.6]) by smtp-border-fw-out-6002.iad6.amazon.com with ESMTP; 23 Dec 2019 01:41:23 +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 1FB17282FB5; Mon, 23 Dec 2019 01:41:20 +0000 (UTC) Received: from EX13D01UWA001.ant.amazon.com (10.43.160.60) by EX13MTAUWA001.ant.amazon.com (10.43.160.118) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 23 Dec 2019 01:41:20 +0000 Received: from EX13MTAUEA001.ant.amazon.com (10.43.61.82) by EX13d01UWA001.ant.amazon.com (10.43.160.60) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 23 Dec 2019 01:41:20 +0000 Received: from localhost (172.23.204.141) by mail-relay.amazon.com (10.43.61.243) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Mon, 23 Dec 2019 01:41:19 +0000 From: Balbir Singh To: <=linux-block@vger.kernel.org>, , CC: , , , , , Balbir Singh Subject: [RFC PATCH 5/5] drivers/scsi/sd.c: Convert to use disk_set_capacity Date: Mon, 23 Dec 2019 01:40:56 +0000 Message-ID: <20191223014056.17318-5-sblbir@amazon.com> X-Mailer: git-send-email 2.16.5 In-Reply-To: <20191223014056.17318-1-sblbir@amazon.com> References: <20191223014056.17318-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 disk_set_capacity() for sending RESIZE notifications via uevents. This notification is newly added to scsi sd. Signed-off-by: Balbir Singh --- drivers/scsi/sd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 5afb0046b12a..1a3be30b6b78 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -3184,7 +3184,7 @@ static int sd_revalidate_disk(struct gendisk *disk) sdkp->first_scan = 0; - set_capacity(disk, logical_to_sectors(sdp, sdkp->capacity)); + disk_set_capacity(disk, logical_to_sectors(sdp, sdkp->capacity)); sd_config_write_same(sdkp); kfree(buffer); -- 2.16.5