All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
To: "'Joel Becker'" <jlbec@evilplan.org>,
	"'Sebastian Andrzej Siewior'" <bigeasy@linutronix.de>
Cc: 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>,
	"'Alan Stern'" <stern@rowland.harvard.edu>
Subject: RE: [RFC 0/2] USB gadget - configfs
Date: Mon, 20 Aug 2012 10:53:42 +0200	[thread overview]
Message-ID: <000001cd7eb1$4d189420$e749bc60$%p@samsung.com> (raw)
In-Reply-To: <20120820055958.GD2102@dhcp-172-17-9-228.mtv.corp.google.com>

Hello Joel,

Thanks for your reply.

On Monday, August 20, 2012 8:00 AM Joel Becker wrote:
> 
> 	I think what you want here is a symlink.  Create a directory
> high in the tree called 'ready' or 'available', and when you want to
> lock the device in place, symlink it into that directory.  This will pin
> the item.  You can also make use of the ->allow_link() and ->drop_link()
> callbacks to prevent symlinking an item until it is fully configured,
> and prevent unlinking an item that is in use.
> 
>   $ ln -s /cfg/usb-function-gadget/G1/C1/F1/f_mass_storage/lun0 \
>         /cfg/usb-function-gadget/ready/
> 

Is using the userspace program "ln" the way you suggest doing it? Or just
a suggestion about what should be the link target and the link name?

If links are to be created from userspace then some other process can race
us and rmdir "lun0" before ln is called, can't it?

And a question to you as the creator of configfs: is using symlinks to
prevent config item deletion their intended purpose? How do you like it?

Thanks,

Andrzej



  reply	other threads:[~2012-08-20  8:53 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-21 10:55 [RFC 0/2] USB gadget - configfs Andrzej Pietrasiewicz
2012-06-21 10:55 ` [RFC 1/2] fs: configfs: add check_rmdir operation Andrzej Pietrasiewicz
2012-07-02  8:49   ` Joel Becker
2012-06-21 10:55 ` [RFC 2/2] usb: gadget: Add USB Functions Gadget Andrzej Pietrasiewicz
2012-06-21 11:34 ` [RFC 0/2] USB gadget - configfs Sebastian Andrzej Siewior
2012-06-24 19:50 ` Sebastian Andrzej Siewior
2012-06-25 14:11   ` Alan Stern
2012-07-03 16:15     ` Felipe Balbi
2012-07-02  9:09 ` Joel Becker
2012-07-10  8:54   ` Andrzej Pietrasiewicz
2012-08-15  8:13     ` Joel Becker
2012-08-16 13:17       ` Andrzej Pietrasiewicz
2012-08-16 13:47         ` Sebastian Andrzej Siewior
2012-08-17  1:46           ` Joel Becker
2012-08-17  9:22             ` Sebastian Andrzej Siewior
2012-08-17 10:30               ` Andrzej Pietrasiewicz
2012-08-17 10:34                 ` Sebastian Andrzej Siewior
2012-08-20  5:59                   ` Joel Becker
2012-08-20  8:53                     ` Andrzej Pietrasiewicz [this message]
2012-08-20 11:17                       ` Joel Becker
2012-08-20 11:01                     ` Sebastian Andrzej Siewior
2012-08-20 11:19                       ` Joel Becker
2012-08-21  8:19                       ` Andrzej Pietrasiewicz
2012-08-29 19:52                         ` Sebastian Andrzej Siewior
2012-08-29 13:17                     ` 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='000001cd7eb1$4d189420$e749bc60$%p@samsung.com' \
    --to=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 \
    --cc=stern@rowland.harvard.edu \
    /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.