• Steven Rostedt's avatar
    tracing: Add rmdir to remove multibuffer instances · 0c8916c3
    Steven Rostedt authored
    Add a method to the hijacked dentry descriptor of the
    "instances" directory to allow for rmdir to remove an
    instance of a multibuffer.
      cd /debug/tracing/instances
      mkdir hello
      rmdir hello
    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: default avatarSteven Rostedt <rostedt@goodmis.org>
trace.h 28.6 KB