From: Joel Becker <jlbec@evilplan.org>
To: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Cc: "'Sebastian Andrzej Siewior'" <bigeasy@linutronix.de>,
"'Michal Nazarewicz'" <mina86@mina86.com>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
"'Kyungmin Park'" <kyungmin.park@samsung.com>,
"'Felipe Balbi'" <balbi@ti.com>,
"'Greg Kroah-Hartman'" <gregkh@linuxfoundation.org>,
Marek Szyprowski <m.szyprowski@samsung.com>
Subject: Re: [RFC][PATCH] fs: configfs: programmatically create config groups
Date: Tue, 11 Dec 2012 17:10:23 -0800 [thread overview]
Message-ID: <20121212011022.GS22789@localhost> (raw)
In-Reply-To: <000001cdd6e1$1ac24f60$5046ee20$%p@samsung.com>
On Mon, Dec 10, 2012 at 03:17:34PM +0100, Andrzej Pietrasiewicz wrote:
> @Joel in particular: please see my comment in the bottom.
<snip>
> I forgot to mention, representing udcs (USB Device Controllers) in
> configfs is similar to interfaces/endpoints: the user needs to guess
> what name to use in mkdir, e.g. in:
>
> $ mkdir ....../udcs/s3c-hsotg
Again, discoverability. Userspace should not need to guess. So
some part of the system (configfs, sysfs, procfs, $dontcare) needs to
know what the available choices are.
> the poor user needs to know that the udc is actually called s3c-hsotg.
> And after the udc goes away from the system, the s3c-hsotg directory
> remains in the filesystem until the user deletes it (as nobody else
> but the user can do it). Again, an attribute like available_udcs in
> the udcs directory can help. But still, there will be times when
> its contents will not be consistent with the directories actually
> present.
How does the system know there is an s3c-hsotg? Is this from
scanning?
> @Joel: Any thoughts about it? Commitable items? E.g. the user creates
> whatever they want, so the "uncommitted" directory contains "garbage",
> that is directories which do not have to correspond to anything
> actually present in the system, but on commiting the gadget's item
> (group in fact) everything is verified and only "correct" gadgets
> are actually bound? Then, in the "uncommitted" directory the user
> can still do whatever they want, but this is not effective until
> uncommitting the old gadget and committing it again? There is just
> a tiny issue with committable items: Are they implemented? :O
Committable items are not implemented, because everyone uses the
'enable' pattern:
$ mkdir foo
$ echo 1024 >foo/attr1
$ echo 2048 >foo/attr2
$ echo 1 >foo/enable
In o2hb, we don't have an explicit "enable" attribute. Instead, we
enable when the block device's file descriptor is stored. If the other
attributes aren't set yet, we fail the store.
Joel
--
Life's Little Instruction Book #451
"Don't be afraid to say, 'I'm sorry.'"
http://www.jlbec.org/
jlbec@evilplan.org
next prev parent reply other threads:[~2012-12-12 1:10 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-26 8:35 [RFC][PATCH] fs: configfs: programmatically create config groups Andrzej Pietrasiewicz
2012-11-26 8:35 ` [RFC][PATCH] fs: configfs: allow other kernel parts to " Andrzej Pietrasiewicz
2012-11-26 13:14 ` [RFC][PATCH] fs: configfs: " Michal Nazarewicz
2012-11-26 16:30 ` Sebastian Andrzej Siewior
2012-11-26 16:56 ` Michal Nazarewicz
2012-11-26 17:06 ` Sebastian Andrzej Siewior
2012-11-26 17:54 ` Michal Nazarewicz
2012-11-27 15:20 ` Sebastian Andrzej Siewior
2012-11-28 7:08 ` Nicholas A. Bellinger
2012-11-27 8:57 ` Andrzej Pietrasiewicz
2012-11-27 14:32 ` Michal Nazarewicz
2012-11-27 15:59 ` Sebastian Andrzej Siewior
2012-11-27 16:23 ` Michal Nazarewicz
2012-11-28 8:15 ` Sebastian Andrzej Siewior
2012-11-28 13:05 ` Michal Nazarewicz
2012-11-28 13:50 ` Sebastian Andrzej Siewior
2012-11-28 14:24 ` Michal Nazarewicz
2012-11-28 18:52 ` Sebastian Andrzej Siewior
2012-12-07 23:18 ` Joel Becker
2012-12-10 11:57 ` Andrzej Pietrasiewicz
2012-12-10 14:17 ` Andrzej Pietrasiewicz
2012-12-10 14:34 ` Felipe Balbi
2012-12-10 15:27 ` Andrzej Pietrasiewicz
2012-12-12 1:10 ` Joel Becker [this message]
2012-12-11 21:27 ` Joel Becker
2012-12-14 12:18 ` Sebastian Andrzej Siewior
2012-11-28 8:10 ` Andrzej Pietrasiewicz
2012-11-28 8:38 ` Sebastian Andrzej Siewior
2012-11-28 14:09 ` Andrzej Pietrasiewicz
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=20121212011022.GS22789@localhost \
--to=jlbec@evilplan.org \
--cc=andrzej.p@samsung.com \
--cc=balbi@ti.com \
--cc=bigeasy@linutronix.de \
--cc=gregkh@linuxfoundation.org \
--cc=kyungmin.park@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=mina86@mina86.com \
/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