From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Al Viro <viro@ZenIV.linux.org.uk>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Ingo Molnar <mingo@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: [PATCH 4/5 v4] tracefs: Add directory /sys/kernel/tracing
Date: Mon, 02 Feb 2015 10:47:07 -0500 [thread overview]
Message-ID: <20150202154753.564753419@goodmis.org> (raw)
In-Reply-To: 20150202154703.794777128@goodmis.org
[-- Attachment #1: 0004-tracefs-Add-directory-sys-kernel-tracing.patch --]
[-- Type: text/plain, Size: 1184 bytes --]
From: "Steven Rostedt (Red Hat)" <rostedt@goodmis.org>
When tracefs is configured, have the directory /sys/kernel/tracing appear
just like /sys/kernel/debug appears when debugfs is configured.
This will give a consistent place for system admins to mount tracefs.
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
fs/tracefs/inode.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/fs/tracefs/inode.c b/fs/tracefs/inode.c
index 5b1547a452d8..0b9cf5cf24c9 100644
--- a/fs/tracefs/inode.c
+++ b/fs/tracefs/inode.c
@@ -16,6 +16,7 @@
#include <linux/module.h>
#include <linux/fs.h>
#include <linux/mount.h>
+#include <linux/kobject.h>
#include <linux/namei.h>
#include <linux/tracefs.h>
#include <linux/fsnotify.h>
@@ -509,10 +510,16 @@ bool tracefs_initialized(void)
return tracefs_registered;
}
+static struct kobject *trace_kobj;
+
static int __init tracefs_init(void)
{
int retval;
+ trace_kobj = kobject_create_and_add("tracing", kernel_kobj);
+ if (!trace_kobj)
+ return -EINVAL;
+
retval = register_filesystem(&trace_fs_type);
if (!retval)
tracefs_registered = true;
--
2.1.4
next prev parent reply other threads:[~2015-02-02 15:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-02 15:47 [PATCH 0/5 v4] tracing: Add new file system tracefs Steven Rostedt
2015-02-02 15:47 ` [PATCH 1/5 v4] tracefs: Add new tracefs file system Steven Rostedt
2015-02-02 15:47 ` [PATCH 2/5 v4] tracing: Convert the tracing facility over to use tracefs Steven Rostedt
2015-02-02 15:47 ` [PATCH 3/5 v4] tracing: Automatically mount tracefs on debugfs/tracing Steven Rostedt
2015-02-02 15:47 ` Steven Rostedt [this message]
2015-02-02 15:47 ` [PATCH 5/5 v4] tracing: Have mkdir and rmdir be part of tracefs Steven Rostedt
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=20150202154753.564753419@goodmis.org \
--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 \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox