Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp4042906ybv; Tue, 25 Feb 2020 12:02:19 -0800 (PST) X-Google-Smtp-Source: APXvYqy921DkcHn37HuGQzeP4sZxSEEHkYxTgaygkTkJyiuHojWmSD+bpoafIgIcjQF6ZQflxOhK X-Received: by 2002:a9d:7d93:: with SMTP id j19mr240678otn.102.1582660939654; Tue, 25 Feb 2020 12:02:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582660939; cv=none; d=google.com; s=arc-20160816; b=Axn3s/bsoowKr/6rMmmxq9PoQdUNJ47jsCqBO0P67nHBa2RQitiaRQ/hwnLlBZk43G YHLvUB8YK5bAuzjpt2yoSI0UPftebzPCFkdExXEFhS+V4b8Ix+gDFng13KyADG4GZZci hMzOUsctWzO30UNDg91c+wpZJNCu8NybtPqRC+nC6D6zqaLNPg8W2YXGCPN1kPYGoeOn DNjinLnzXql7KqD70ZDKyyJ9Ze/W6fSHv4Zf8s/tonDG7L4ofz+k3QTydjpd3PfhxXe8 zavxQEq1kv0PmvvvdG2bLU6s32dMGELZUQLtCwPhwagbP7TmJ5SJ9Bnxs+FBZdrIKvkT OySA== 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=IGGEuXoM1vhgNdPHGfmJkF4ZZBTHe0gyExXTjNm042k=; b=XGAWR/dap58Oxuy1c0FHWUsBjkJM+/ZIH6Y5ric2rBaaKSaXxzOOzhFf+G2S2QxIM8 tiUQ9Z+RJZvEKjEqfcRRf4FeoAXK/EB/p40PuXiFtqoRJ4f5NyN2BXvgslu1CKEg/0YF 86is4vwTtVRFjnmSH9BU5e3Nrpz8PAydU+NxFLYdvHqlvl/GZjevADbVtgNXVg8xbnsq d6XlwjTBcHcM9qy7dnLzLz37XQS1grz5r745I5Em+LTvTlz1/cIRXnQzH5x569N/LQms K21sC9CLSgiK6nO/oWPefXfQxsvLKuAQjxwtZM0uIVydcMEMIlqp7dMISsK0Hr03fquo Fcbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=iyAsAbTj; 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 v5si96746oix.197.2020.02.25.12.02.07; Tue, 25 Feb 2020 12:02:19 -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=iyAsAbTj; 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 S1731340AbgBYUBs (ORCPT + 99 others); Tue, 25 Feb 2020 15:01:48 -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 S1728443AbgBYUBr (ORCPT ); Tue, 25 Feb 2020 15:01:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1582660908; x=1614196908; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=IGGEuXoM1vhgNdPHGfmJkF4ZZBTHe0gyExXTjNm042k=; b=iyAsAbTj9V7+HbrqQqM1ibcSTpJTrKCNuD3PLDKRvnozD4e++pbCyEDl YZ77zjiRcybsiaIbeSzLnFgTA97TU4sH0b3pW+ljhjsqgrjS8q8muldat xymdMiIaoBzyvCOduyC3khHrPfDkYOYfeGlYMPog+ldPA9t7CIMS/Lp1V w=; IronPort-SDR: sIDibpbH5Z/LQCtiwHnfct680Mzw6Gf0V9euNo/CQE/9MggaOCamNFYgY1/LpstqfB8zuWR8k1 EGbXixSYb0SA== X-IronPort-AV: E=Sophos;i="5.70,485,1574121600"; d="scan'208";a="28822858" Received: from sea32-co-svc-lb4-vlan3.sea.corp.amazon.com (HELO email-inbound-relay-1e-303d0b0e.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 EX13MTAUWA001.ant.amazon.com (iad55-ws-svc-p15-lb9-vlan3.iad.amazon.com [10.40.159.166]) by email-inbound-relay-1e-303d0b0e.us-east-1.amazon.com (Postfix) with ESMTPS id B02CDA07F5; Tue, 25 Feb 2020 20:01:42 +0000 (UTC) Received: from EX13D01UWA004.ant.amazon.com (10.43.160.99) by EX13MTAUWA001.ant.amazon.com (10.43.160.118) 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 EX13d01UWA004.ant.amazon.com (10.43.160.99) 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 2/5] drivers/block/virtio_blk.c: Convert to use set_capacity_revalidate_and_notify Date: Tue, 25 Feb 2020 20:01:26 +0000 Message-ID: <20200225200129.6687-3-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/virtio_blk.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 54158766334b..c913ebb25a52 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -381,18 +381,15 @@ static void virtblk_update_capacity(struct virtio_blk *vblk, bool resize) cap_str_10, cap_str_2); - set_capacity(vblk->disk, capacity); + set_capacity_revalidate_and_notify(vblk->disk, capacity, true); } 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.6