Re: [PATCH] loop: add some basic read-only sysfs attributes

From: Milan Broz
Date: Thu Jul 29 2010 - 16:24:27 EST


On 07/29/2010 09:56 PM, Karel Zak wrote:
>> Sure it does. Sysfs attributes need to be created _before_ uevents are
>> sent out. The current behavior is that all blockdev attributes are
>> safely created before the event is sent. These loop attributes are
>> created _after_ the event is sent.
>>
>> The question is if we can rely on the fact, that 'add' events never
>> want to look at any of these attributes, and all can be deferred to

The problem is that add_disk() initializes kobject and announces device.
How can I add some new attributes (subdir) with the current code
before it happens?

And why it is problem at all? After configuration there is always change
event and at this time attributes are there.

Milan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/