LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: linux-kernel@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Ingo Molnar <mingo@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 00/16 v3] tracing: Add new file system tracefs
Date: Mon, 26 Jan 2015 18:37:39 -0500	[thread overview]
Message-ID: <20150126183739.1d17fd82@gandalf.local.home> (raw)
In-Reply-To: <20150126214020.GO29656@ZenIV.linux.org.uk>

On Mon, 26 Jan 2015 21:40:20 +0000
Al Viro <viro@ZenIV.linux.org.uk> wrote:


> Is the following correct?
> 	* only one directory in the entire tree (/instances) allows mkdir/rmdir.

yes

> 	* ftrace_trace_arrays always starts with global_trace and the rest
> is in 1-to-1 correspondence with subdirectories of /instances.

pretty much.

> 	* tr->name is NULL for global_trace and non-NULL for everything
> else.

yes.

> 	* all modifications of that list are happening from mkdir/rmdir

yes.

> 	* in the end of ->mkdir tr->dir set to the dentry of our subdirectory,
> and it's non-NULL (or trace_array creation simply fails)

yes.

> 	* global_array.dir is set to magical value ((struct dentry *)1) upon

This is new for this patch series. Currently, global_array.dir points
to the dentry of /sys/kernel/debug/tracing. 

> the first call of tracing_init_dentry().  Prior to that it's NULL.  BTW, may
> I politely inquire what the fuck are those contortions in
> tracing_init_dentry_tr() about?  Looks like a stunningly convoluted way
> to trigger that automount point creation early in tracer_init_tracefs().
> Why not do that right there explicitly?

Yeah, that could be cleaned up. Before the tracefs code, it made much
more sense to keep that as a single function. Now that global_array.dir
is treated differently as the subdirs, it does make sense to have
global_arry.dir initialized in a separate function.

I'll update my patch series to do this.


> 
> What are mount options doing?  I mean, sure, you set the mode/uid/gid
> of root.  Which is not modifiable anyway...  And AFAICS that's all those
> options are affecting.

You mean in tracefs.c/inode.c? I have no idea, they are there from
debugfs cut and paste ;-)

> 
> AFAICS, nothing ever removes files in debugfs root.  Right?  If so, you don't

I'm not sure about that. Well, not from tracing or from userspace. But
I believe things can be removed from debugfs root with module unload.
But are you talking about tracefs root?

> need the games with simple_pin_fs() - they are pointless in such situation
> anyway.  Just do tracefs_mount = kern_mount(&trace_fs_type); in tracefs_init()
> and be done with that; lose the tracefs_mount_count and all calls of
> simple_{pin,release}_fs().

OK, cool. Because I had no idea what hey were used for anyway. ;-)

> 
> While we are at it, what the hell is tracefs_file_operations about?  Looks
> like some bastard offspring of /dev/null, but I don't see anything that would
> use it...

Hehe, again, this is what debugfs did and I just brought it over
thinking I needed it.

Thanks,

-- Steve

  reply	other threads:[~2015-01-27  0:33 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-26 15:09 Steven Rostedt
2015-01-26 15:09 ` [PATCH 01/16 v3] debugfs_{mkdir,create,link}(): get rid of redundant argument Steven Rostedt
2015-01-26 15:09 ` [PATCH 02/16 v3] debugfs: split the beginning and the end of __create_file() off Steven Rostedt
2015-01-26 15:09 ` [PATCH 03/16 v3] debugfs: kill __create_file() Steven Rostedt
2015-01-26 15:09 ` [PATCH 04/16 v3] fold debugfs_link() into caller Steven Rostedt
2015-01-26 15:09 ` [PATCH 05/16 v3] debugfs_mknod(): get rid useless arguments Steven Rostedt
2015-01-26 15:09 ` [PATCH 06/16 v3] fold debugfs_mkdir() into caller Steven Rostedt
2015-01-26 15:09 ` [PATCH 07/16 v3] fold debugfs_create() " Steven Rostedt
2015-01-26 15:09 ` [PATCH 08/16 v3] fold debugfs_mknod() into callers Steven Rostedt
2015-01-26 15:09 ` [PATCH 09/16 v3] debugfs: take mode-dependent parts of debugfs_get_inode() " Steven Rostedt
2015-01-26 15:09 ` [PATCH 10/16 v3] debugfs: split end_creating() into success and failure cases Steven Rostedt
2015-01-26 15:09 ` [PATCH 11/16 v3] new primitive: debugfs_create_automount() Steven Rostedt
2015-01-26 15:09 ` [PATCH 12/16 v3] tracefs: Add new tracefs file system Steven Rostedt
2015-01-26 15:09 ` [PATCH 13/16 v3] tracing: Convert the tracing facility over to use tracefs Steven Rostedt
2015-01-26 15:09 ` [PATCH 14/16 v3] tracing: Automatically mount tracefs on debugfs/tracing Steven Rostedt
2015-01-26 15:09 ` [PATCH 15/16 v3] tracefs: Add directory /sys/kernel/tracing Steven Rostedt
2015-01-26 15:09 ` [PATCH 16/16 v3] tracing: Have mkdir and rmdir be part of tracefs Steven Rostedt
2015-01-26 19:30 ` [PATCH 00/16 v3] tracing: Add new file system tracefs Al Viro
2015-01-26 20:42   ` Steven Rostedt
2015-01-26 20:44     ` Steven Rostedt
2015-01-26 20:58       ` Steven Rostedt
2015-01-26 21:44         ` Al Viro
2015-01-26 21:46     ` Al Viro
2015-01-26 23:02       ` Al Viro
2015-01-26 23:39         ` Steven Rostedt
2015-01-26 23:43       ` Steven Rostedt
2015-01-26 23:49         ` Steven Rostedt
2015-01-27  0:39           ` Steven Rostedt
2015-01-27  4:34             ` Al Viro
2015-01-27 15:15               ` Steven Rostedt
2015-01-27  0:37         ` Al Viro
2015-01-27  1:02           ` Steven Rostedt
2015-01-27  1:03             ` Steven Rostedt
2015-01-27  4:38               ` Al Viro
2015-01-27 15:19                 ` Steven Rostedt
2015-01-27 15:44                   ` Steven Rostedt
2015-01-26 21:40   ` Al Viro
2015-01-26 23:37     ` Steven Rostedt [this message]
2015-01-27  2:34       ` Steven Rostedt
2015-01-27  4:46         ` Al Viro

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=20150126183739.1d17fd82@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=akpm@linux-foundation.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=viro@ZenIV.linux.org.uk \
    --subject='Re: [PATCH 00/16 v3] tracing: Add new file system tracefs' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).