From patchwork Thu Jan 2 07:53:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Singh, Balbir" X-Patchwork-Id: 11315429 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EECD5138D for ; Thu, 2 Jan 2020 07:53:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CD89C20866 for ; Thu, 2 Jan 2020 07:53:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=amazon.com header.i=@amazon.com header.b="EClBXzcb" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727721AbgABHx2 (ORCPT ); Thu, 2 Jan 2020 02:53:28 -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 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@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: