From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH v2 00/12] gendisk: Generate uevent after attribute available Date: Wed, 29 Jun 2016 23:24:42 -0700 Message-ID: <20160630062442.GA19761@infradead.org> References: <20160630015953.6888-1-famz@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20160630015953.6888-1-famz@redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: virtualization-bounces@lists.linux-foundation.org Errors-To: virtualization-bounces@lists.linux-foundation.org To: Fam Zheng Cc: Sergey Senozhatsky , "Michael S. Tsirkin" , Benjamin Herrenschmidt , linux-nvme@lists.infradead.org, virtualization@lists.linux-foundation.org, Keith Busch , Paul Mackerras , Michael Ellerman , Shaohua Li , Nitin Gupta , Jiri Kosina , linux-block@vger.kernel.org, dan.j.williams@intel.com, "Ed L. Cashin" , Jens Axboe , linux-raid@vger.kernel.org, David Woodhouse , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, Minchan Kim , linux-mtd@lists.infradead.org, Brian Norris , linuxppc-dev@lists.ozlabs.org List-Id: linux-raid.ids On Thu, Jun 30, 2016 at 09:59:41AM +0800, Fam Zheng wrote: > Documentation/kobject.txt: > > Use the KOBJ_ADD action for when the kobject is first added to the kernel. > > This should be done only after any attributes or children of the kobject > > have been initialized properly, as userspace will instantly start to look > > for them when this call happens. > > Unfortunately it seems impossible to fix this generally without touching the > offending callers. The approach I'm proposing here is adding a flag to > suppress uevent in add_disk(), which is patch 1, then in later patches, convert > any caller to only trigger the uevent when attributes are added. We (or rather Dan) is touching most add_disk callers anyway for the driverfs_dev removal. Let's just pass the array of attributes to a disk_add variant and solve the issue for real. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Wed, 29 Jun 2016 23:24:42 -0700 From: Christoph Hellwig To: Fam Zheng Subject: Re: [PATCH v2 00/12] gendisk: Generate uevent after attribute available Message-ID: <20160630062442.GA19761@infradead.org> References: <20160630015953.6888-1-famz@redhat.com> MIME-Version: 1.0 In-Reply-To: <20160630015953.6888-1-famz@redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ulf Hansson , Sergey Senozhatsky , "Michael S. Tsirkin" , Benjamin Herrenschmidt , linux-nvme@lists.infradead.org, virtualization@lists.linux-foundation.org, Keith Busch , Paul Mackerras , Michael Ellerman , Shaohua Li , Nitin Gupta , Jiri Kosina , linux-block@vger.kernel.org, dan.j.williams@intel.com, "Ed L. Cashin" , Jens Axboe , linux-raid@vger.kernel.org, David Woodhouse , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, Minchan Kim , linux-mtd@lists.infradead.org, Brian Norris , linuxppc-dev@lists.ozlabs.org Content-Type: text/plain; charset="us-ascii" Sender: "Linux-nvme" Errors-To: linux-nvme-bounces+axboe=kernel.dk@lists.infradead.org List-ID: On Thu, Jun 30, 2016 at 09:59:41AM +0800, Fam Zheng wrote: > Documentation/kobject.txt: > > Use the KOBJ_ADD action for when the kobject is first added to the kernel. > > This should be done only after any attributes or children of the kobject > > have been initialized properly, as userspace will instantly start to look > > for them when this call happens. > > Unfortunately it seems impossible to fix this generally without touching the > offending callers. The approach I'm proposing here is adding a flag to > suppress uevent in add_disk(), which is patch 1, then in later patches, convert > any caller to only trigger the uevent when attributes are added. We (or rather Dan) is touching most add_disk callers anyway for the driverfs_dev removal. Let's just pass the array of attributes to a disk_add variant and solve the issue for real. _______________________________________________ Linux-nvme mailing list Linux-nvme@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-nvme From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752018AbcF3G0W (ORCPT ); Thu, 30 Jun 2016 02:26:22 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:60461 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751182AbcF3GZ1 (ORCPT ); Thu, 30 Jun 2016 02:25:27 -0400 Date: Wed, 29 Jun 2016 23:24:42 -0700 From: Christoph Hellwig To: Fam Zheng Cc: linux-kernel@vger.kernel.org, Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Jens Axboe , "Ed L. Cashin" , Jiri Kosina , "Michael S. Tsirkin" , Minchan Kim , Nitin Gupta , Sergey Senozhatsky , Shaohua Li , Ulf Hansson , David Woodhouse , Brian Norris , Keith Busch , linuxppc-dev@lists.ozlabs.org, linux-block@vger.kernel.org, virtualization@lists.linux-foundation.org, linux-raid@vger.kernel.org, linux-mmc@vger.kernel.org, linux-mtd@lists.infradead.org, linux-nvme@lists.infradead.org, dan.j.williams@intel.com Subject: Re: [PATCH v2 00/12] gendisk: Generate uevent after attribute available Message-ID: <20160630062442.GA19761@infradead.org> References: <20160630015953.6888-1-famz@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160630015953.6888-1-famz@redhat.com> User-Agent: Mutt/1.6.1 (2016-04-27) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 30, 2016 at 09:59:41AM +0800, Fam Zheng wrote: > Documentation/kobject.txt: > > Use the KOBJ_ADD action for when the kobject is first added to the kernel. > > This should be done only after any attributes or children of the kobject > > have been initialized properly, as userspace will instantly start to look > > for them when this call happens. > > Unfortunately it seems impossible to fix this generally without touching the > offending callers. The approach I'm proposing here is adding a flag to > suppress uevent in add_disk(), which is patch 1, then in later patches, convert > any caller to only trigger the uevent when attributes are added. We (or rather Dan) is touching most add_disk callers anyway for the driverfs_dev removal. Let's just pass the array of attributes to a disk_add variant and solve the issue for real. From mboxrd@z Thu Jan 1 00:00:00 1970 From: hch@infradead.org (Christoph Hellwig) Date: Wed, 29 Jun 2016 23:24:42 -0700 Subject: [PATCH v2 00/12] gendisk: Generate uevent after attribute available In-Reply-To: <20160630015953.6888-1-famz@redhat.com> References: <20160630015953.6888-1-famz@redhat.com> Message-ID: <20160630062442.GA19761@infradead.org> On Thu, Jun 30, 2016@09:59:41AM +0800, Fam Zheng wrote: > Documentation/kobject.txt: > > Use the KOBJ_ADD action for when the kobject is first added to the kernel. > > This should be done only after any attributes or children of the kobject > > have been initialized properly, as userspace will instantly start to look > > for them when this call happens. > > Unfortunately it seems impossible to fix this generally without touching the > offending callers. The approach I'm proposing here is adding a flag to > suppress uevent in add_disk(), which is patch 1, then in later patches, convert > any caller to only trigger the uevent when attributes are added. We (or rather Dan) is touching most add_disk callers anyway for the driverfs_dev removal. Let's just pass the array of attributes to a disk_add variant and solve the issue for real.