Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp4042857ybv; Tue, 25 Feb 2020 12:02:17 -0800 (PST) X-Google-Smtp-Source: APXvYqzV4g8HXLebniVvdh/1J/VcmV0rkiBDbLp0rnFHeXow39d8KSfcJ8io91fykwNcyxdMj+2Z X-Received: by 2002:a05:6830:1149:: with SMTP id x9mr234678otq.156.1582660936961; Tue, 25 Feb 2020 12:02:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582660936; cv=none; d=google.com; s=arc-20160816; b=mLvj/zChstVryoc8kn5Nf4bAtXpZKeiGzWykY0hUcsvboXVBGCqG27yDIY2lhOVbwg eUXAOvAjSKEeRdXlb0Xh3rSZfADwN8BOYAVhpJ9buz6/sqSkTSq9YTiOv6JPVPwshvsd aNRdZGmfI/Irv9BPcn2qVMAWil0GLYDmYmWqhBq7ns09PSXEuJdJ/zNxO2x9FXqtEQ8t 6E5AOLzbHJwD/yuY0cpynotIHCtAx58/FZ4s/60agsI+WCvbXimMP3BZ3emBhq26IZ4z HxbkuK4xrNAOxlEVY3rKnbUpCTqNVK59qwjUtAhOE7qAv1KZ4hyOeoU+5xuVtFZaml3K wQtA== 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=h4sGEbKL2BfyOYFPk4o3ZidZGMzs/+yLuzx6u+LWF+c=; b=jGqR8QL/L/hwlinGJ75FDtus7pL31LDPoKt3jVKBXZaSUVO3/5b8JVAi5dkl6K4o71 WY0S5escmjzX2u4wpocTvEOXfJz7SdKiF3v7ie/0IFnuQbIKQ8YO3PX8pfI2HasDiDfC NDbNdqug3p4RXrhJYsUchaelLu+Iyrtg+BGW5dhAjr7+d1VQKoXjkjF8YThEDXz7hkx8 GsV/1w88n3qseeen4vwxc44FLK+U6K1MwZk7CaVwkW+ClCkpcMRr2dHZWYQ7SQn+OilU scEj0Gobm92i5b/nRIDuZ4qp0pZeB1utU/rChmmMtopVxtnQmbJ/ZueHQs/89nLHk1zJ hQQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=OWRgrzRS; 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 9si109814ois.90.2020.02.25.12.02.03; Tue, 25 Feb 2020 12:02: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=OWRgrzRS; 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 S1731409AbgBYUBu (ORCPT + 99 others); Tue, 25 Feb 2020 15:01:50 -0500 Received: from smtp-fw-33001.amazon.com ([207.171.190.10]:10403 "EHLO smtp-fw-33001.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731214AbgBYUBt (ORCPT ); Tue, 25 Feb 2020 15:01:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1582660909; x=1614196909; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=h4sGEbKL2BfyOYFPk4o3ZidZGMzs/+yLuzx6u+LWF+c=; b=OWRgrzRS7tSOKJfla87OKsmcDMLLYnNwp0HOu7dFAs+V6hrZK8cj2kxz PNn/dNAzUtGUA/EAZEz0OnV5bw07/x3sr+PqE6Bb+rQYFVLYEjhQ+/yeZ rDGFpf4fn4yUUOrhsSC8X9EI9p/LOoDNRwN+obPK1nVOyoSiQIjLgk7JD I=; IronPort-SDR: PIcXLS6IdDwar29q1JwczS7BaXlePUp9+XEqqYnB09xUPN2199xfoVyhtsa8IMpr9vhSAd2a86 jXf8ao08QJ1A== X-IronPort-AV: E=Sophos;i="5.70,485,1574121600"; d="scan'208";a="28822857" Received: from sea32-co-svc-lb4-vlan3.sea.corp.amazon.com (HELO email-inbound-relay-1a-821c648d.us-east-1.amazon.com) ([10.47.23.38]) by smtp-border-fw-out-33001.sea14.amazon.com with ESMTP; 25 Feb 2020 20:01:46 +0000 Received: from EX13MTAUWB001.ant.amazon.com (iad55-ws-svc-p15-lb9-vlan3.iad.amazon.com [10.40.159.166]) by email-inbound-relay-1a-821c648d.us-east-1.amazon.com (Postfix) with ESMTPS id CF115A06F1; Tue, 25 Feb 2020 20:01:42 +0000 (UTC) Received: from EX13D01UWB001.ant.amazon.com (10.43.161.75) 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 EX13d01UWB001.ant.amazon.com (10.43.161.75) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 25 Feb 2020 20:01:41 +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:41 +0000 From: Balbir Singh To: , , CC: , , , , , Balbir Singh Subject: [PATCH v2 3/5] drivers/block/xen-blkfront.c: Convert to use set_capacity_revalidate_and_notify Date: Tue, 25 Feb 2020 20:01:27 +0000 Message-ID: <20200225200129.6687-4-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. Signed-off-by: Balbir Singh --- drivers/block/xen-blkfront.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c index e2ad6bba2281..2f7cd842d6ce 100644 --- a/drivers/block/xen-blkfront.c +++ b/drivers/block/xen-blkfront.c @@ -2335,7 +2335,6 @@ static void blkfront_connect(struct blkfront_info *info) unsigned long sector_size; unsigned int physical_sector_size; unsigned int binfo; - char *envp[] = { "RESIZE=1", NULL }; int err, i; switch (info->connected) { @@ -2350,10 +2349,7 @@ static void blkfront_connect(struct blkfront_info *info) return; printk(KERN_INFO "Setting capacity to %Lu\n", sectors); - set_capacity(info->gd, sectors); - revalidate_disk(info->gd); - kobject_uevent_env(&disk_to_dev(info->gd)->kobj, - KOBJ_CHANGE, envp); + set_capacity_revalidate_and_notify(info->gd, sectors, true); return; case BLKIF_STATE_SUSPENDED: -- 2.16.6