MOS Source Code
Loading...
Searching...
No Matches
mount.c File Reference
+ Include dependency graph for mount.c:

Go to the source code of this file.

Macros

#define VFS_MOUNTPOINT_MAP_SIZE   256
 

Functions

static void mountpoint_map_init (void)
 
 MOS_INIT (PRE_VFS, mountpoint_map_init)
 
dentry_tdentry_root_get_mountpoint (dentry_t *dentry)
 Given a mounted root dentry, return the mountpoint dentry that points to it.
 
mount_tdentry_get_mount (const dentry_t *dentry)
 
bool dentry_mount (dentry_t *mountpoint, dentry_t *root, filesystem_t *fs)
 Mount a filesystem at a mountpoint.
 
dentry_tdentry_unmount (dentry_t *root)
 Unmount a filesystem at the mountpoint.
 

Variables

static hashmap_t vfs_mountpoint_map = { 0 }
 
list_head vfs_mountpoint_list = LIST_HEAD_INIT(vfs_mountpoint_list)
 

Macro Definition Documentation

◆ VFS_MOUNTPOINT_MAP_SIZE

#define VFS_MOUNTPOINT_MAP_SIZE   256

Definition at line 12 of file mount.c.

Referenced by mountpoint_map_init().

Function Documentation

◆ mountpoint_map_init()

static void mountpoint_map_init ( void )
static

Definition at line 15 of file mount.c.

+ Here is the call graph for this function:

◆ MOS_INIT()

MOS_INIT ( PRE_VFS ,
mountpoint_map_init  )

◆ dentry_root_get_mountpoint()

dentry_t * dentry_root_get_mountpoint ( dentry_t * dentry)

Given a mounted root dentry, return the mountpoint dentry that points to it.

Parameters
dentryThe mounted root dentry
Returns
dentry_t* The mountpoint dentry

Definition at line 28 of file mount.c.

Referenced by dentry_path(), dentry_ref_up_to(), dentry_resolve_lastseg(), dentry_resolve_to_parent(), dentry_unmount(), and dentry_unref_one_norelease().

+ Here is the call graph for this function:

◆ dentry_get_mount()

mount_t * dentry_get_mount ( const dentry_t * dentry)

Definition at line 56 of file mount.c.

Referenced by dentry_dump_refstat(), dentry_resolve_lastseg(), dentry_resolve_to_parent(), dentry_root_get_mountpoint(), and dentry_unmount().

+ Here is the call graph for this function:

Variable Documentation

◆ vfs_mountpoint_map

hashmap_t vfs_mountpoint_map = { 0 }
static

Definition at line 13 of file mount.c.

Referenced by dentry_get_mount(), dentry_mount(), dentry_unmount(), and mountpoint_map_init().

◆ vfs_mountpoint_list

list_head vfs_mountpoint_list = LIST_HEAD_INIT(vfs_mountpoint_list)

Definition at line 20 of file mount.c.

Referenced by dentry_mount(), and vfs_sysfs_mountpoints().