[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAA9_cmeb99S+UoZ7A-4HHmT_rFRgnSaBX=YszEk8+4_=n9cOnA@mail.gmail.com>
Date: Thu, 30 Jun 2016 18:29:31 -0700
From: Dan Williams <dan.j.williams@...el.com>
To: Fam Zheng <famz@...hat.com>
Cc: Christoph Hellwig <hch@...radead.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>,
Michael Ellerman <mpe@...erman.id.au>,
Jens Axboe <axboe@...nel.dk>,
"Ed L. Cashin" <ed.cashin@....org>, Jiri Kosina <jikos@...nel.org>,
"Michael S. Tsirkin" <mst@...hat.com>,
Minchan Kim <minchan@...nel.org>,
Nitin Gupta <ngupta@...are.org>,
Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
Shaohua Li <shli@...nel.org>,
Ulf Hansson <ulf.hansson@...aro.org>,
David Woodhouse <dwmw2@...radead.org>,
Brian Norris <computersforpeace@...il.com>,
Keith Busch <keith.busch@...el.com>,
linuxppc-dev <linuxppc-dev@...ts.ozlabs.org>,
linux-block@...r.kernel.org,
virtualization@...ts.linux-foundation.org,
linux-raid <linux-raid@...r.kernel.org>,
"linux-mmc@...r.kernel.org" <linux-mmc@...r.kernel.org>,
linux-mtd@...ts.infradead.org, linux-nvme@...ts.infradead.org
Subject: Re: [PATCH v2 00/12] gendisk: Generate uevent after attribute available
On Thu, Jun 30, 2016 at 6:01 PM, Fam Zheng <famz@...hat.com> wrote:
> On Wed, 06/29 23:38, Christoph Hellwig wrote:
>> On Thu, Jun 30, 2016 at 02:35:54PM +0800, Fam Zheng wrote:
>> > also more code and less flexible IMO. For example, we need at least two
>> > variants, for attribute_group and device_attribute separately, right?
>>
>> Yes, or maybe just a calling convention that just passes both.
>
> OK, I can look into that, but I'm not sure about the error handling. Currently
> add_disk returns void, do you have any plan on that too? should I change it in
> v3 (to at least return the attribute creation failure)?
I think we should only support a "groups" interface to
device_add_disk() and convert all the drivers that currently do
device_create_file() after add_disk() to pass in a group list instead.
That way we follow the expectation that the only way to get an
attribute for a device to show up before KOBJ_ADD, is to define a
group:
>From Documentation/driver-model/device.txt:
As explained in Documentation/kobject.txt, device attributes must be be
created before the KOBJ_ADD uevent is generated. The only way to realize
that is by defining an attribute group.
Let's defer the return value fixing for now.
You can find the pending device_add_disk() patches in the nvdimm
patchwork starting with "block: introduce device_add_disk()"
https://patchwork.kernel.org/project/linux-nvdimm/list/
Powered by blists - more mailing lists