PatchworkOS
Loading...
Searching...
No Matches
namespace.c File Reference
#include <kernel/fs/namespace.h>
#include <kernel/cpu/syscalls.h>
#include <kernel/fs/dentry.h>
#include <kernel/fs/mount.h>
#include <kernel/fs/path.h>
#include <kernel/fs/superblock.h>
#include <kernel/fs/vfs.h>
#include <kernel/log/log.h>
#include <kernel/proc/process.h>
#include <kernel/sched/thread.h>
#include <errno.h>

Go to the source code of this file.

Functions

static map_key_t mount_cache_key (mount_id_t parentId, dentry_id_t mountpointId)
 
uint64_t namespace_init (namespace_t *ns, namespace_t *parent, process_t *owner)
 Initializes a namespace.
 
void namespace_deinit (namespace_t *ns)
 Deinitializes a namespace.
 
uint64_t namespace_traverse_mount (namespace_t *ns, const path_t *mountpoint, path_t *outRoot)
 Traverse a mountpoint path to the root of the mounted filesystem.
 
mount_tnamespace_mount (namespace_t *ns, path_t *mountpoint, const char *deviceName, const char *fsName, void *private)
 Mount a filesystem in a namespace.
 
mount_tnamespace_bind (namespace_t *ns, dentry_t *source, path_t *mountpoint)
 Bind a directory to a mountpoint in a namespace.
 
 SYSCALL_DEFINE (SYS_BIND, uint64_t, fd_t source, const char *mountpointString)
 
uint64_t namespace_get_root_path (namespace_t *ns, path_t *outPath)
 Get the root path of a namespace.
 

Function Documentation

◆ mount_cache_key()

static map_key_t mount_cache_key ( mount_id_t  parentId,
dentry_id_t  mountpointId 
)
static

Definition at line 15 of file namespace.c.

References buffer, and map_key_buffer().

Referenced by namespace_bind(), namespace_mount(), and namespace_traverse_mount().

◆ SYSCALL_DEFINE()