eventfs_create_dir(9)
π eventfs_create_dir(9) β Kernel API Manual π
okay bestie, welcome to eventfs_create_dir(9) from the Kernel API Manual. it's giving kernel-internals but make it cute. let's slay this β¨
πΈ NAME πΈ
eventfs_create_dir β create the eventfs_inode for this directory. no cap, that's the whole name vibe.
β¨ SYNOPSIS β¨
struct eventfs_inode * eventfs_create_dir (const char *name , struct
eventfs_inode *parent , const struct eventfs_entry *entries , int size ,
void *data );
π ARGUMENTS π
nameβ the name of the directory to create.parentβ theeventfs_inodeof the parent directory.entriesβ a list of entries that represent the files under this directory.sizeβ the number of entries.dataβ the default data to pass to the files (an entry may override it).
π DESCRIPTION π
okay so this function creates the descriptor that represents a directory in eventfs. that descriptor is an eventfs_inode, and it's returned to be used to create other children underneath. main character energy fr fr. π
The entries is an array of eventfs_entry structures which has:
const char *name eventfs_callback callback;
The name is the name of the file, and the callback is a pointer to a function that will be called when the file is referenced (either by lookup or by reading a directory). The callback is of the prototype:
int callback(const char *name, umode_t *mode, void **data, const struct
file_operations **fops);
When a file needs to be created, this callback will be called with:
name= the name of the file being created (so that the same callback may be used for multiple files).mode= a place to set the file's modedata= A pointer to data, and the callback may replace it, which will cause the file created to pass the new data to the open call.fops= the fops to use for the created file.
NB. callback is called while holding internal locks of the eventfs system. The callback must not call any code that might also call into the tracefs or eventfs system or it will risk creating a deadlock. π this is the serious part, bestie β do not play with it.
π¦ SEE ALSO π¦
Kernel file ./fs/tracefs/event_inode.c and these icons: lookup_file(9), lookup_dir_entry(9), eventfs_d_release(9), lookup_file_dentry(9), eventfs_root_lookup(9), eventfs_create_events_dir(9), eventfs_remove_rec(9), eventfs_remove_dir(9), eventfs_remove_events_dir(9).
that's the page, bestie π«Ά β source/version is ./fs/tracefs, date is October 2026, and the title is eventfs_create_dir(9). periodt β¨π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms