]> git.baikalelectronics.ru Git - kernel.git/commit
tracing: Add rmdir to remove multibuffer instances
authorSteven Rostedt <srostedt@redhat.com>
Tue, 7 Aug 2012 20:14:16 +0000 (16:14 -0400)
committerSteven Rostedt <rostedt@goodmis.org>
Fri, 15 Mar 2013 04:34:45 +0000 (00:34 -0400)
commitbd298e70580791d183c4a8d5cb61bc08b5fb2262
treef975bab6327e974b9f6a274b2e104b6ddd692f0c
parentf6c6bca93d6b909835f1dfadee5d2c1def6f3729
tracing: Add rmdir to remove multibuffer instances

Add a method to the hijacked dentry descriptor of the
"instances" directory to allow for rmdir to remove an
instance of a multibuffer.

Example:

  cd /debug/tracing/instances
  mkdir hello
  ls
hello/
  rmdir hello
  ls

Like the mkdir method, the i_mutex is dropped for the instances
directory. The instances directory is created at boot up and can
not be renamed or removed. The trace_types_lock mutex is used to
synchronize adding and removing of instances.

I've run several stress tests with different threads trying to
create and delete directories of the same name, and it has stood
up fine.

Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/trace.c
kernel/trace/trace.h
kernel/trace/trace_events.c