lkml.org 
[lkml]   [2015]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 00/16 v3] tracing: Add new file system tracefs
On Mon, Jan 26, 2015 at 09:46:58PM +0000, Al Viro wrote:
> On Mon, Jan 26, 2015 at 03:42:59PM -0500, Steven Rostedt wrote:
> > On Mon, 26 Jan 2015 19:30:49 +0000
> > Al Viro <viro@ZenIV.linux.org.uk> wrote:
> >
> > > You are still fighting an inconvenient API, but now it's not debugfs one -
> > > it's your copy thereof. Why not give your instances/ an inode_operations
> > > of its own? One with ->mkdir() and ->rmdir(), leaving all other directories
> > > as-is. That way you don't need the secondary methods at all. And sure,
> > > debugfs_create_dir() grabs ->i_mutex on parent, making you drop that in
> > > your ->mkdir() if you want to call it. But now you are not talking to it -
> > > just to your own code, where you are free to change the calling conventions,
> > > making it caller's responsibility to get that ->i_mutex. The same goes for
> > > the rmdir side...
> >
> > The vfs layer grabs the i_mutex, which needs to be dropped.
>
> What for? Just keep it through your instance_mkdir/instance_rmdir and be
> done with that. Sure, it means that you need variants of file/directory
> creation/removal primitives that would assume that parent is already locked
> by caller (and would leave unlocking to the caller as well). So add them...

BTW, could you merge vfs.git#debugfs_automount, rather than copy the commits
into your branch? Bloody inconvenient as it is...


\
 
 \ /
  Last update: 2015-01-27 00:21    [W:0.142 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site