From: Jens Axboe <axboe@kernel.dk>
To: Karel Zak <kzak@redhat.com>
Cc: Kay Sievers <kay.sievers@vrfy.org>, Milan Broz <mbroz@redhat.com>,
util-linux-ng@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] loop: add some basic read-only sysfs attributes
Date: Mon, 23 Aug 2010 14:30:56 +0200 [thread overview]
Message-ID: <4C726A00.2070703@kernel.dk> (raw)
In-Reply-To: <20100823122926.GC13712@nb.net.home>
On 2010-08-23 14:29, Karel Zak wrote:
> On Fri, Jul 30, 2010 at 04:34:43PM +0200, Kay Sievers wrote:
>> On Fri, Jul 30, 2010 at 16:22, Milan Broz <mbroz@redhat.com> wrote:
>>> On 07/30/2010 06:36 AM, Kay Sievers wrote:
>>>
>>>> Alternatively, these attributes could be created and removed/created
>>>> with the ioctl, and before the 'change' event, only if there is an
>>>> active backing file, but I would expect the attribute group at the
>>>> device to work just fine.
>>> I have no idea how you can add attribute group before add_disk() which
>>> initializes kobj (it ends with BUG_ON in internal_create_group
>>> - because !kobj->sd). Perhaps I missed something?
>>
>> Attribute groups handle the creation of a kobject (subdir) for you,
>> you only supply a name to the group. Without a name, they will put all
>> the attributes in the root of the device.
>>
>> The 'struct device' has a member **groups, and that can have a list of
>> attribute groups assigned. You assign them before you register the
>> device, and the core will take care of everything.
>>
>>> Anyway, second approach works - now is loop attributes available only
>>> when loop is configured and before CHANGE uevent is sent.
>>>
>>> Ok with that?
>>
>> Sounds good, nothing to complain from a sysfs timing perspective.
>
> Jens, ping... it would be really really nice to have this feature in
> kernel.
>
> The ioctls are useless and I'd like to minimize number of situations
> where mount(8) behaviour depends on /etc/mtab.
Looks good to me as well and agree on the ioctls. Care to resend
a fresh patch and I will queue it up for 2.6.37.
--
Jens Axboe
next prev parent reply other threads:[~2010-08-23 12:30 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20100722101541.GU15652@nb.net.home>
2010-07-29 13:33 ` [PATCH] loop: add some basic read-only sysfs attributes Milan Broz
2010-07-29 13:47 ` Kay Sievers
2010-07-29 14:06 ` Milan Broz
2010-07-29 14:22 ` Kay Sievers
2010-07-29 14:35 ` Milan Broz
2010-07-29 14:58 ` Karel Zak
2010-07-29 16:07 ` Kay Sievers
2010-07-29 19:56 ` Karel Zak
2010-07-29 20:06 ` Karel Zak
2010-07-29 20:24 ` Milan Broz
2010-07-30 4:36 ` Kay Sievers
2010-07-30 14:22 ` [PATCH v2] " Milan Broz
2010-07-30 14:34 ` Kay Sievers
2010-08-23 12:29 ` Karel Zak
2010-08-23 12:30 ` Jens Axboe [this message]
2010-07-30 7:37 ` [PATCH] " Karel Zak
2010-07-30 7:43 ` Kay Sievers
2010-07-30 8:01 ` Kay Sievers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C726A00.2070703@kernel.dk \
--to=axboe@kernel.dk \
--cc=kay.sievers@vrfy.org \
--cc=kzak@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mbroz@redhat.com \
--cc=util-linux-ng@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox