All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Nazarewicz <mina86@mina86.com>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Andrzej Pietrasiewicz <andrzej.p@samsung.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>,
	"'Joel Becker'" <jlbec@evilplan.org>,
	Marek Szyprowski <m.szyprowski@samsung.com>
Subject: Re: [RFC][PATCH] fs: configfs: programmatically create config groups
Date: Wed, 28 Nov 2012 14:05:07 +0100	[thread overview]
Message-ID: <xa1ta9u1naik.fsf@mina86.com> (raw)
In-Reply-To: <50B5C821.4000406@linutronix.de>

[-- Attachment #1: Type: text/plain, Size: 2482 bytes --]

> On 11/27/2012 05:23 PM, Michal Nazarewicz wrote:
>> How should a generic tool know what kind of actions are needed for given
>> function to be removed?  If you ask me, there should be a way to unbind
>> gadget and unload all modules without any specific knowledge of the
>> functions.  If there is no such mechanism, then it's a bad user
>> interface.

On Wed, Nov 28 2012, Sebastian Andrzej Siewior wrote:
> Well. You need only to remove the directories you created.

My point is that there should be a way to write a script that is unaware
of the way function is configured, ie. which directories were created
and which were not.

Besides, if you rmdir lun0, is the function still supposed to work with
all LUNs present?  In my opinion, while gadget is bound, it should not
be possible to modify such things.

> An unbind would be  simply an unlink of the gadget  which is linked to
> the udc.   All configurations  remain so  you can link  it at  a later
> point without touching the configuration because it is as it was.

Yes, but that's not my concern.  My concern is that I should be able to
put a relatively simple code in my shutdown script (or whatever) which
unbinds all gadgets, without knowing what kind of functions are used.

And I'm proposing that this could be done by allowing user to just do:

	cd /cfs/...
	rmdir gadgets/*		# unbind and remove all gadgets
	rmdir functions/*/*	# unbind and remove all function instances
	rmdir functions/*	# unload all functions
	rmdir udcs/*		# unload all UDCs
        
>> I think the question is of information flow direction.  If user gives
>> some information to the kernel, she should be the one creating any
>> necessary directories.  But if the information comes from kernel to the
>> user, the kernel should create the structure.

> Yes that is a point. But the "name" can go away if we use it in the
> directory name. That is what other configfs user do. The same is true
> for luns for instance. I just want to avoid adding features because we
> do something different compared to every other configfs user.

You've lost me here.  What are we talking about again?  What “name” are
you referring to?

-- 
Best regards,                                         _     _
.o. | Liege of Serenely Enlightened Majesty of      o' \,=./ `o
..o | Computer Science,  Michał “mina86” Nazarewicz    (o o)
ooo +----<email/xmpp: mpn@google.com>--------------ooO--(_)--Ooo--

[-- Attachment #2.1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #2.2: Type: application/pgp-signature, Size: 835 bytes --]

  reply	other threads:[~2012-11-28 13:05 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 [this message]
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
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=xa1ta9u1naik.fsf@mina86.com \
    --to=mina86@mina86.com \
    --cc=andrzej.p@samsung.com \
    --cc=balbi@ti.com \
    --cc=bigeasy@linutronix.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=jlbec@evilplan.org \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=m.szyprowski@samsung.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.