[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <000501cd5e79$a770be50$f6523af0$%p@samsung.com>
Date: Tue, 10 Jul 2012 10:54:44 +0200
From: Andrzej Pietrasiewicz <andrzej.p@...sung.com>
To: 'Joel Becker' <jlbec@...lplan.org>
Cc: linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
'Kyungmin Park' <kyungmin.park@...sung.com>,
'Felipe Balbi' <balbi@...com>,
'Greg Kroah-Hartman' <gregkh@...uxfoundation.org>,
'Sebastian Andrzej Siewior' <bigeasy@...utronix.de>,
Marek Szyprowski <m.szyprowski@...sung.com>,
'Alan Stern' <stern@...land.harvard.edu>
Subject: RE: [RFC 0/2] USB gadget - configfs
Dear Joel,
Thank you for your review.
@Sebastian, Alan, Felipe: Thank you, too.
On Monday, July 02, 2012 11:09 AM Joel Becker wrote:
<snip>
>
> > As a prerequisite it adds an operation to configfs. The operation allows
> > checking if it is ok to remove a pseudo directory corresponding to a
> > configfs item/group.
>
> I NAK'd that patch because you should be using
> configfs_depend_item(). If you have trouble with that, let's talk.
>
Now I see the configfs_depend_item() is the way to go. I am in doubt,
though, so could you please throw some light on it? Here is why:
As an example I did a quick-and-dirty port of f_mass_storage to the new,
configfs-based approach. The business logic of this function is that
once a lun is opened, it must not be changed (deleted, in particular)
until it is closed. The moment the lun is opened is defined by a write
to a configfs "file" attribute of a lun config item:
+-/lunX
| |
| +-file
| |
| +-nofua
| |
| +-removable
| |
| +-ro
So, the config item corresponding to the lun becomes depended on during
the write file operation, the same with undepend. Can this be expressed
with configfs_depend/undepend_item()? Your code in fs/configfs/dir.c
contains a warning not to call the configfs_depend_item()
from a configfs callback.
In this case, is store_attribute a configfs callback?
Thanks,
Andrzej
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists