Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp1324747ybh; Thu, 12 Mar 2020 22:31:45 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvqnFMtHCeVNVfW4JZ6FAnok2wWRlcLpIqLUVO4kbdCxHBbUahskxt/br0H4JV9AxBZTTDk X-Received: by 2002:aca:7517:: with SMTP id q23mr5555824oic.23.1584077505834; Thu, 12 Mar 2020 22:31:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584077505; cv=none; d=google.com; s=arc-20160816; b=04I0UsyWY7cE0cX8PuVl83D6vqCzdUZWs2rFcaW4eQctj4DXwWOQ6+cwRPW21b40Px xpl7PqfH2Ut5dtLOE276C/adDKo5AmMKZE9z9U0tz1tQciSNY1vqU54b7Q6HYpGxddYi ue2fkN/87RAMyx7NYAE4vdog5VF7Mb9R1nLdaYYiWzy/qMTxZa1d6ZLGm3p1XdEDuFf8 2zHiVv/DCIBgOhUjTwtZWGtyZWgBjM8v3+1xWEotU+pWHkHaHqJbQrVc3OsIIO/fqrmz 9r93Vnbt5PR/RocbCpsWAwfGXdkbQZ7LZoBP2Z8fbTLN+ZRL+wCRRNIT5qJ/A04k5glr wVcA== 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=pSzW8oLJrcnD5LFaQ7mkfrCb3JwilLPc6w4RiXMWEp4=; b=ZBurZbdnJpKGrakMrUxq+3wPPHmmXd8CSGsZUY09retIkOQ89VnEdIxwm+d8xsIwqX mV3QxiF2A++2yu+DAvG+wa9H2eqz4e00MgdxF1PKCNPJ+kcXqHsRmufQVljYzBqo17tU B1RP16DL6iis79tBJBr2HbhSz/0JzEIyi/iLABpDlJSEQ38eOwWkM/rGwtkfsDsiPB/D Tw0Q1sceunxN1w4ZF2Wy1AxJQJ1liPtt571ot0EAZhCIbRyNfc3gbY2NTCZcjINCntXE aoBZpVqBtboddsym49UmsgfLFw9EQkBRzzXO3uF65gF+sn6UKM1nGUpLtXOR9LxnaYBA gLaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=ehJRsC4k; 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 b4si4037928otq.178.2020.03.12.22.31.33; Thu, 12 Mar 2020 22:31:45 -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=ehJRsC4k; 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 S1726535AbgCMFau (ORCPT + 99 others); Fri, 13 Mar 2020 01:30:50 -0400 Received: from smtp-fw-6002.amazon.com ([52.95.49.90]:40319 "EHLO smtp-fw-6002.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725535AbgCMFau (ORCPT ); Fri, 13 Mar 2020 01:30:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1584077450; x=1615613450; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=pSzW8oLJrcnD5LFaQ7mkfrCb3JwilLPc6w4RiXMWEp4=; b=ehJRsC4kIPLmj5QpmBzAK436G3zDc2nRU3wdGMBx96iCJufv7TUXF1J1 MbGsBdk7VJEfkVYSgugIXbTG1nIEGQdA2gjh8ZkG/mm2vAcXu4KmC04sI JxYu5fR9gJ3eApPCkH/B5xLGg5hzAk8M72bI3pgBHmZctSwvg1PHsYxKO k=; IronPort-SDR: tbu8fDwzMo2L54dw4u8oUFZjuSMBpsMjd/2nEqkd1s7pWN4YozZhYfEQ2RTUsNlmPMI5s2HhDK yF/ENjhdkgOA== X-IronPort-AV: E=Sophos;i="5.70,547,1574121600"; d="scan'208";a="20880508" Received: from iad12-co-svc-p1-lb1-vlan3.amazon.com (HELO email-inbound-relay-1a-16acd5e0.us-east-1.amazon.com) ([10.43.8.6]) by smtp-border-fw-out-6002.iad6.amazon.com with ESMTP; 13 Mar 2020 05:30:49 +0000 Received: from EX13MTAUWA001.ant.amazon.com (iad55-ws-svc-p15-lb9-vlan2.iad.amazon.com [10.40.159.162]) by email-inbound-relay-1a-16acd5e0.us-east-1.amazon.com (Postfix) with ESMTPS id B3FF5A2E91; 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:18 +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 3/5] xen-blkfront.c: Convert to use set_capacity_revalidate_and_notify Date: Fri, 13 Mar 2020 05:30:07 +0000 Message-ID: <20200313053009.19866-4-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. 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 9df516a56bb2..915cf5b6388c 100644 --- a/drivers/block/xen-blkfront.c +++ b/drivers/block/xen-blkfront.c @@ -2338,7 +2338,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; struct blkfront_ring_info *rinfo; @@ -2354,10 +2353,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