|
PatchworkOS
|
#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_t * | namespace_mount (namespace_t *ns, path_t *mountpoint, const char *deviceName, const char *fsName, void *private) |
| Mount a filesystem in a namespace. | |
| mount_t * | namespace_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. | |
|
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().
Definition at line 235 of file namespace.c.
References bind(), path_t::dentry, DEREF, DEREF_DEFER, EINVAL, ERR, errno, namespace_bind(), NULL, file_t::path, thread_t::process, sched_thread(), thread_copy_from_user_pathname(), vfs_ctx_get_file(), vfs_walk(), process_t::vfsCtx, and WALK_NONE.