lkml.org 
[lkml]   [2012]   [Jul]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [RFC 0/2] USB gadget - configfs
Date
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





\
 
 \ /
  Last update: 2012-07-10 11:22    [W:0.105 / U:1.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site