Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp17177609ybl; Wed, 1 Jan 2020 23:54:20 -0800 (PST) X-Google-Smtp-Source: APXvYqx9yC6fDnM9Iy6fAdvRd/PLTtx4Nt1enw+XK4mucTDvYdeDTK5/hRug7VRyNmxObOB6gPEy X-Received: by 2002:a05:6830:110a:: with SMTP id w10mr94100913otq.300.1577951660328; Wed, 01 Jan 2020 23:54:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577951660; cv=none; d=google.com; s=arc-20160816; b=o/ECZPhqBixzPjmropOpKrMCQHUJhwQ8rYf6bJUJuf/OkvRmhRNNds1P+WWSKLztnD uuJFaJnQsFTSId8dyUpy+ApHOE7CHZP1MKQWjinkeo+71ivke5sEiso+Vbdc3AjsvqOK BsGJMdPFvIQ9Bpek8uO9wW0yML8bVHGk8Yr0gWP7I1JgsQOuhBxCgpShwhY0QMj/K40w MxpwBBLn8dfGWKEA+zQOOVOcRV4VF9WnyqNVsLgmyEV8sEwcdM9kz9E5SYpUzfv8HSBS zcJkfRk0C4DFhgbqayBluc0RZbG+314Q26NdtvYdf0W5uBLYlof6wFQmM1rUcbPwgpAA jbqQ== 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=Lu5wUxicX2nqy1FtOE1ySeTvkT4l5dpgfpukGpnD/kE=; b=ZMELYylHwr0Ziv4rjZVDgCIzgLYX3pEDTPl9vE10B6091Ija7yVRMQP15oydU3bFqv OnbysHo9xb371OGTrgQPp7Sv4bSwDNl21DGPre99d4Z9nfLc8NLmkiHcJE4o0UErc0jU oqz/56TlTR7WhO85bbzmNSoBgrGCza7yttlx86JI24GRShH8RWcnwMERXn3JBJXh9C1t utThXhSkHmy+nVN49kXELCNtiPrL+vmUCGeJyNA2tryJ/wBIXYw8gkYFqTwO4NDBUVvF JdnPkgiYNeaSWkfNWOghx316gPhPcjDV11BFR4S7tM8K2Fb97+cOEsvmymIxUdt2ZZuf 6zNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=EClBXzcb; 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 i15si26688635otk.120.2020.01.01.23.54.08; Wed, 01 Jan 2020 23:54:20 -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=EClBXzcb; 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 S1727743AbgABHx3 (ORCPT + 99 others); Thu, 2 Jan 2020 02:53:29 -0500 Received: from smtp-fw-4101.amazon.com ([72.21.198.25]:60261 "EHLO smtp-fw-4101.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726145AbgABHx1 (ORCPT ); Thu, 2 Jan 2020 02:53:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1577951607; x=1609487607; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=Lu5wUxicX2nqy1FtOE1ySeTvkT4l5dpgfpukGpnD/kE=; b=EClBXzcbr2dv3hrI54y1oRkaFHJvD3xrwDa1T3IhOJffQJvMczJr9P/U TGZoNSuM/aWNSn7pGz5FfswAI9meZCW496ZU90UTMVv8AKZOY5CmZAm1I jzJGAoy0UUjFkUBGxzywFU0xX13RMSAfglkUs6U3WYgpBeMNb9dg4iUku I=; IronPort-SDR: F+UfTDX7e6DI5Y0hnnkPGHSJNSsLUL5ST+80JyH2hyUDVkICXF/Vb8r+IexeFcg9wbkNgDJqdx jSPWiT2OsRlw== X-IronPort-AV: E=Sophos;i="5.69,386,1571702400"; d="scan'208";a="10648269" Received: from iad12-co-svc-p1-lb1-vlan3.amazon.com (HELO email-inbound-relay-1d-98acfc19.us-east-1.amazon.com) ([10.43.8.6]) by smtp-border-fw-out-4101.iad4.amazon.com with ESMTP; 02 Jan 2020 07:53:25 +0000 Received: from EX13MTAUWC001.ant.amazon.com (iad55-ws-svc-p15-lb9-vlan3.iad.amazon.com [10.40.159.166]) by email-inbound-relay-1d-98acfc19.us-east-1.amazon.com (Postfix) with ESMTPS id 51581A22C7; Thu, 2 Jan 2020 07:53:22 +0000 (UTC) Received: from EX13D11UWC002.ant.amazon.com (10.43.162.174) by EX13MTAUWC001.ant.amazon.com (10.43.162.135) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Thu, 2 Jan 2020 07:53:22 +0000 Received: from EX13MTAUEA001.ant.amazon.com (10.43.61.82) by EX13D11UWC002.ant.amazon.com (10.43.162.174) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Thu, 2 Jan 2020 07:53:21 +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; Thu, 2 Jan 2020 07:53:20 +0000 From: Balbir Singh To: , , CC: , , , , , , Balbir Singh Subject: [resend v1 3/5] drivers/block/xen-blkfront.c: Convert to use disk_set_capacity Date: Thu, 2 Jan 2020 07:53:13 +0000 Message-ID: <20200102075315.22652-4-sblbir@amazon.com> X-Mailer: git-send-email 2.16.5 In-Reply-To: <20200102075315.22652-1-sblbir@amazon.com> References: <20200102075315.22652-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. Signed-off-by: Balbir Singh --- drivers/block/xen-blkfront.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c index 23c86350a5ab..bed7050a697d 100644 --- a/drivers/block/xen-blkfront.c +++ b/drivers/block/xen-blkfront.c @@ -2337,7 +2337,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) { @@ -2352,10 +2351,8 @@ static void blkfront_connect(struct blkfront_info *info) return; printk(KERN_INFO "Setting capacity to %Lu\n", sectors); - set_capacity(info->gd, sectors); + disk_set_capacity(info->gd, sectors); revalidate_disk(info->gd); - kobject_uevent_env(&disk_to_dev(info->gd)->kobj, - KOBJ_CHANGE, envp); return; case BLKIF_STATE_SUSPENDED: -- 2.16.5