12#define VFS_MOUNTPOINT_MAP_SIZE 256
45 if (child->is_mountpoint)
48 if (mount->
root == dentry)
60 mos_warn(
"dentry is not a mountpoint");
99 mos_warn(
"failed to insert mountpoint into hashmap");
#define MOS_ASSERT_X(cond, msg,...)
#define mos_warn(fmt,...)
dentry_t * dentry_unmount(dentry_t *root)
Unmount a filesystem at the mountpoint.
bool dentry_mount(dentry_t *mountpoint, dentry_t *root, filesystem_t *fs)
Mount a filesystem at a mountpoint.
dentry_t * dentry_ref(dentry_t *dentry)
Increment the reference count of a dentry.
should_inline dentry_t * dentry_parent(const dentry_t *dentry)
MOSAPI int __pure hashmap_simple_key_compare(uintn key1, uintn key2)
MOSAPI hash_t __pure hashmap_identity_hash(uintn key)
MOSAPI void * hashmap_get(hashmap_t *map, uintn key)
MOSAPI void * hashmap_put(hashmap_t *map, uintn key, void *value)
MOSAPI void hashmap_init(hashmap_t *map, size_t capacity, hashmap_hash_t hash_func, hashmap_key_compare_t compare_func)
MOSAPI void * hashmap_remove(hashmap_t *map, uintn key)
MOSAPI void linked_list_init(list_node_t *head_node)
Initialise a circular double linked list.
#define LIST_HEAD_INIT(container)
MOSAPI void list_node_append(list_node_t *head, list_node_t *item)
#define list_node(element)
Get the ‘list_node’ of a list element. This is exactly the reverse of ‘list_entry’ above.
list_node_t list_head
A linked list head.
MOSAPI void list_node_remove(list_node_t *link)
#define VFS_MOUNTPOINT_MAP_SIZE
dentry_t * dentry_root_get_mountpoint(dentry_t *dentry)
Given a mounted root dentry, return the mountpoint dentry that points to it.
mount_t * dentry_get_mount(const dentry_t *dentry)
static hashmap_t vfs_mountpoint_map
static void mountpoint_map_init(void)
list_head vfs_mountpoint_list
#define MOS_INIT(_comp, _fn)
superblock_t * superblock
superblock_t * superblock
#define tree_node(element)
#define tree_foreach_child(t, v, h)