Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp17177562ybl; Wed, 1 Jan 2020 23:54:16 -0800 (PST) X-Google-Smtp-Source: APXvYqwikC74tVdf09PWTv+aRtYTSlHQiunfwO1RUWc3TY3nP5k7sRqhJdEZzDjzAEk/OHLuoEvt X-Received: by 2002:a9d:6d06:: with SMTP id o6mr91401679otp.239.1577951656841; Wed, 01 Jan 2020 23:54:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577951656; cv=none; d=google.com; s=arc-20160816; b=RE6a3C0mWOkecdAT0aCKBsP1BoKIQj6Hx371Hutw3P+0gTVRIV8SPFUOR+jUvRloj0 Aj2kXCYpkT8oHWxqG/Q4SqmgyxWHG06M6JgwBaPhRSvneExutLMGy/4W5gUcSKj6F85p 9nUbP9x4Wr7q1BmfjRjk2uCpjOhMlQuq1JEW8QbNZp4UWDmLhDtUpS52SeCGi8oXF5Ik DW/a19Fpyx7ze/ICTz9k5gWC6VNLmMQoU1YapHvqvVYSgHLQZd73wOkMapV8Y2aNUQMP gfGsht8XuJfXQsp7mbQ8flNNfNh1HnpCV+6oDqQygQQIpmHN7N/sCMhf2TB0lQvPBMeu +AJQ== 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=bFqvuHtUJ2uTuBGE5u3MI0p2QpGGNs+AUqkx0RpdLvY=; b=RE0EkWkolNZpwHjvCuafj+E/5GcVhKYueBDpKYv5RkHpBuPoQPINceRgaWNfJ9lCHh Vn0ILrS5tOBLkH6jo3yGBoOdIXkDDlKtHdaoRq52/eI0nIXgpCFLcaewUmhsvCsrC+FH GmH/l5z95lM8sq1vA9GMxUWIl8NzBCeOv2+AvPYZoJ/nn26cCNwLw+fIzLameAlt7Q4M uRnU0IWHcPD21xGz1vXsl/nN9U9OIzJvgS9SIPEEQeVfgk+fPxS0O+S1iVo0OG93vznt PUq6D1+RHEfmuuDu+eqHCYC0OfrbtOzLsLCnvJVjrV5VHDSQY+yHf2VWr2ITzqPTpCYu i0Yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=wEv2x8t7; 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 u25si25824599otg.170.2020.01.01.23.54.04; Wed, 01 Jan 2020 23:54: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=wEv2x8t7; 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 S1727714AbgABHxZ (ORCPT + 99 others); Thu, 2 Jan 2020 02:53:25 -0500 Received: from smtp-fw-6002.amazon.com ([52.95.49.90]:35797 "EHLO smtp-fw-6002.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726145AbgABHxZ (ORCPT ); Thu, 2 Jan 2020 02:53:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1577951605; x=1609487605; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=bFqvuHtUJ2uTuBGE5u3MI0p2QpGGNs+AUqkx0RpdLvY=; b=wEv2x8t7KYv9Lih6EHzXMF8++oG5ZlHqJuhW7PJFSmIh+2pAmL8sRShl jij0QyEyazFcn7sOYjZ3kpDPw4VnqyO9QFKokfWvJbTRWJFi62nU/r4UE HHeHojS0EzWkrKWzxbIEUUM7W6gXLAaLYwj8BV2PSQDMR3m8mTl/UWm/c k=; IronPort-SDR: RNTC/4q3xGWHPIh9vssYnvrzBZGJuP19UJzRbqvoIonGLncvhmcp0JXo+YaHAWgnXjsCY0bewp oZ4tNqPWAC5A== X-IronPort-AV: E=Sophos;i="5.69,386,1571702400"; d="scan'208";a="9797737" Received: from iad12-co-svc-p1-lb1-vlan3.amazon.com (HELO email-inbound-relay-2a-e7be2041.us-west-2.amazon.com) ([10.43.8.6]) by smtp-border-fw-out-6002.iad6.amazon.com with ESMTP; 02 Jan 2020 07:53:22 +0000 Received: from EX13MTAUWB001.ant.amazon.com (pdx4-ws-svc-p6-lb7-vlan2.pdx.amazon.com [10.170.41.162]) by email-inbound-relay-2a-e7be2041.us-west-2.amazon.com (Postfix) with ESMTPS id 438D1A1E23; Thu, 2 Jan 2020 07:53:21 +0000 (UTC) Received: from EX13D11UWB003.ant.amazon.com (10.43.161.206) by EX13MTAUWB001.ant.amazon.com (10.43.161.249) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Thu, 2 Jan 2020 07:53:20 +0000 Received: from EX13MTAUEA001.ant.amazon.com (10.43.61.82) by EX13D11UWB003.ant.amazon.com (10.43.161.206) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Thu, 2 Jan 2020 07:53: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; Thu, 2 Jan 2020 07:53:19 +0000 From: Balbir Singh To: , , CC: , , , , , , Balbir Singh Subject: [resend v1 2/5] drivers/block/virtio_blk.c: Convert to use disk_set_capacity Date: Thu, 2 Jan 2020 07:53:12 +0000 Message-ID: <20200102075315.22652-3-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/virtio_blk.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index fbbf18ac1d5d..9848c94a7eb4 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -479,18 +479,16 @@ static void virtblk_update_capacity(struct virtio_blk *vblk, bool resize) cap_str_10, cap_str_2); - set_capacity(vblk->disk, capacity); + disk_set_capacity(vblk->disk, capacity); } static void virtblk_config_changed_work(struct work_struct *work) { struct virtio_blk *vblk = container_of(work, struct virtio_blk, config_work); - char *envp[] = { "RESIZE=1", NULL }; virtblk_update_capacity(vblk, true); revalidate_disk(vblk->disk); - kobject_uevent_env(&disk_to_dev(vblk->disk)->kobj, KOBJ_CHANGE, envp); } static void virtblk_config_changed(struct virtio_device *vdev) -- 2.16.5