From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_ADSP_ALL, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AA144C43603 for ; Wed, 11 Dec 2019 19:36:33 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7ACAF206C3 for ; Wed, 11 Dec 2019 19:36:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="VSSdyBWs"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=amazon.com header.i=@amazon.com header.b="gRHyiZSh" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7ACAF206C3 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=amazon.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-nvme-bounces+linux-nvme=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-ID:In-Reply-To: References:Message-ID:Date:Subject:To:From:Reply-To:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=6hwgOE/yqZ6xfN6Qr/UOEehFt9jivklNBhoYZKNaA64=; b=VSSdyBWsTGGQGd KbPb9gvJPYw4JlYvi9DYxCUv2Y8pYm8rLt6Fc3MRlHVsRTbicMTvfw3kahaR0i+nYo+jzL2VyORKT K0qwh9WlKxGw9xCnd4eTLEosKGu/5CSWPhMpcuPhd9ayQW+sicpJSbJgoooUdp+/RV5ju21p/WhTU rEIPNhegDWWM0h1/BKCkdoFjg1xhClOGTQYAgDj6ODwdHonMhEw8Oz0lRsTUlxzJXbXsc7yuUHlko 3kEuHfyexr0rL9svbCp+cGnaSQytqnbT33T1baHTKBtW82uNnoV7V659acu3xyAmRxb531f30+sxG F744Ru0QpgjTUMPiS7fA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1if7me-0000qE-5v; Wed, 11 Dec 2019 19:36:28 +0000 Received: from smtp-fw-9102.amazon.com ([207.171.184.29]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1if7mb-0000p4-Hl for linux-nvme@lists.infradead.org; Wed, 11 Dec 2019 19:36:26 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1576092986; x=1607628986; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-id:content-transfer-encoding: mime-version; bh=D/AQrht491ZPuSkniyC8AF1uSsDZTxSScktHXQ9tcas=; b=gRHyiZSh4bZQ678Onj+vyHZJfNRnv5NMdL2aYgfJBaM38Ywd+6bgoIEZ mR0HxB1EM0NTAeIhS4hx+pPUnsCFDkm5pJX7kgvtJl9phV/gY26hyzu6R JN57e0cE73ccDdzmuTHPI/AZyzOCeFd1C8rYfsHlpOQlVaE8vB+OZiNQz g=; IronPort-SDR: 7kOHZMP+PPKT5dumufzq2UMtwAG5aP/xGikeM+OabQlSKdSYXfor3mTs9QQCWKGTMkgOm2ZvsG ZPnHUPl7HBFQ== X-IronPort-AV: E=Sophos;i="5.69,303,1571702400"; d="scan'208";a="12985776" Received: from sea32-co-svc-lb4-vlan3.sea.corp.amazon.com (HELO email-inbound-relay-2a-e7be2041.us-west-2.amazon.com) ([10.47.23.38]) by smtp-border-fw-out-9102.sea19.amazon.com with ESMTP; 11 Dec 2019 19:36:11 +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 2B294A22B0; Wed, 11 Dec 2019 19:36:10 +0000 (UTC) Received: from EX13D11UWB003.ant.amazon.com (10.43.161.206) by EX13MTAUWB001.ant.amazon.com (10.43.161.207) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Wed, 11 Dec 2019 19:36:09 +0000 Received: from EX13D01UWB002.ant.amazon.com (10.43.161.136) by EX13D11UWB003.ant.amazon.com (10.43.161.206) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Wed, 11 Dec 2019 19:36:09 +0000 Received: from EX13D01UWB002.ant.amazon.com ([10.43.161.136]) by EX13d01UWB002.ant.amazon.com ([10.43.161.136]) with mapi id 15.00.1367.000; Wed, 11 Dec 2019 19:36:09 +0000 From: "Singh, Balbir" To: "linux-block@vger.kernel.org" Subject: Re: [RFC PATCH] block/genhd: Notify udev about capacity change Thread-Topic: [RFC PATCH] block/genhd: Notify udev about capacity change Thread-Index: AQHVrwYjh2l0GmmZOEmELsmopgOsAqe1Vm2A Date: Wed, 11 Dec 2019 19:36:09 +0000 Message-ID: <3e23c39e2d6c99ce8bdae370de36f7479b6dab95.camel@amazon.com> References: <20191210030131.4198-1-sblbir@amazon.com> In-Reply-To: <20191210030131.4198-1-sblbir@amazon.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.43.162.171] Content-ID: <04931DD686A9514F94F948B5E992FB49@amazon.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191211_113625_631313_2860A256 X-CRM114-Status: GOOD ( 14.20 ) X-BeenThere: linux-nvme@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "axboe@kernel.dk" , "mst@redhat.com" , "jejb@linux.ibm.com" , "linux-kernel@vger.kernel.org" , "linux-nvme@lists.infradead.org" , "Sangaraju, Someswarudu" , "hch@lst.de" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-nvme" Errors-To: linux-nvme-bounces+linux-nvme=archiver.kernel.org@lists.infradead.org On Tue, 2019-12-10 at 03:01 +0000, Balbir Singh wrote: > Allow block/genhd to notify user space (via udev) about disk size changes > using a new helper disk_set_capacity(), which is a wrapper on top > of set_capacity(). disk_set_capacity() will only notify via udev if > the current capacity or the target capacity is not zero. > > disk_set_capacity() is not enabled for all devices, just virtio block, > xen-blockfront, nvme and sd. Owners of other block disk devices can > easily move over by changing set_capacity() to disk_set_capacity() > > Background: > > As a part of a patch to allow sending the RESIZE event on disk capacity > change, Christoph (hch@lst.de) requested that the patch be made generic > and the hacks for virtio block and xen block devices be removed and > merged via a generic helper. > > Testing: > 1. I did some basic testing with an NVME device, by resizing it in > the backend and ensured that udevd received the event. > > Suggested-by: Christoph Hellwig > Signed-off-by: Balbir Singh > Signed-off-by: Someswarudu Sangaraju > Any feedback on the RFC? Balbir Singh. _______________________________________________ linux-nvme mailing list linux-nvme@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-nvme