The primary objects of the Virtual Filesystem are the superblock, the inode, the dentry, and the file. These structs, and their corresponding operations objects, are defined in the following files.
The
include/linux/fs.h
file provides declarations of the
inode
,
inode_operations
,
file
,
file_operations
,
super_block
and
super_operations
structures.
The
include/linux/dcache.h
file provides declarations of the
dentry
and
dentry_operations
structures.
Linking, mounting, and unmounting filesystem objects,
e.g. via the ln
, mount
, and umount
utilities,
is achieved through the link
, mount
, and umount
syscalls.
These backing functions for these syscalls are defined in the following files.
The
fs/namei.c
file provides
kernel functionality for establishing and removing hard links, including the definitions for the
link
and
unlink
syscalls.
The
fs/namespace.c
file provides
kernel functionality for mounting and unmounting filesystems, including the definitions for the
mount
and
umount
syscalls.
Functionality for the inotify interface, which enables the monitoring of filesystem events, can be found in the
fs/notify/inotify/inotify_user.c
file.
Of note, this file includes definitions for the
inotify_init
and
inotify_add_watch
syscalls.