mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-14 06:35:12 +00:00
c1504e5102
Add eventfs_file structure which will hold the properties of the eventfs files and directories. Add following functions to create the directories in eventfs: eventfs_create_events_dir() will create the top level "events" directory within the tracefs file system. eventfs_add_subsystem_dir() creates an eventfs_file descriptor with the given name of the subsystem. eventfs_add_dir() creates an eventfs_file descriptor with the given name of the directory and attached to a eventfs_file of a subsystem. Add tracefs_inode structure to hold the inodes, flags and pointers to private data used by eventfs. Link: https://lkml.kernel.org/r/1690568452-46553-5-git-send-email-akaher@vmware.com Signed-off-by: Ajay Kaher <akaher@vmware.com> Co-developed-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Tested-by: Ching-lin Yu <chinglinyu@google.com> Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-lkp/202305051619.9a469a9a-yujie.liu@intel.com Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
51 lines
1.3 KiB
C
51 lines
1.3 KiB
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* tracefs.h - a pseudo file system for activating tracing
|
|
*
|
|
* Based on debugfs by: 2004 Greg Kroah-Hartman <greg@kroah.com>
|
|
*
|
|
* Copyright (C) 2014 Red Hat Inc, author: Steven Rostedt <srostedt@redhat.com>
|
|
*
|
|
* tracefs is the file system that is used by the tracing infrastructure.
|
|
*/
|
|
|
|
#ifndef _TRACEFS_H_
|
|
#define _TRACEFS_H_
|
|
|
|
#include <linux/fs.h>
|
|
#include <linux/seq_file.h>
|
|
|
|
#include <linux/types.h>
|
|
|
|
struct file_operations;
|
|
|
|
#ifdef CONFIG_TRACING
|
|
|
|
struct eventfs_file;
|
|
|
|
struct dentry *eventfs_create_events_dir(const char *name,
|
|
struct dentry *parent);
|
|
|
|
struct eventfs_file *eventfs_add_subsystem_dir(const char *name,
|
|
struct dentry *parent);
|
|
|
|
struct eventfs_file *eventfs_add_dir(const char *name,
|
|
struct eventfs_file *ef_parent);
|
|
|
|
struct dentry *tracefs_create_file(const char *name, umode_t mode,
|
|
struct dentry *parent, void *data,
|
|
const struct file_operations *fops);
|
|
|
|
struct dentry *tracefs_create_dir(const char *name, struct dentry *parent);
|
|
|
|
void tracefs_remove(struct dentry *dentry);
|
|
|
|
struct dentry *tracefs_create_instance_dir(const char *name, struct dentry *parent,
|
|
int (*mkdir)(const char *name),
|
|
int (*rmdir)(const char *name));
|
|
|
|
bool tracefs_initialized(void);
|
|
|
|
#endif /* CONFIG_TRACING */
|
|
|
|
#endif
|