#include "vfs.h"
#include <stdlib.h>
#include <str.h>
#include <fibril_synch.h>
#include <adt/hash_table.h>
#include <assert.h>
#include <async.h>
#include <errno.h>
Go to the source code of this file.
Data Structures | |
struct | refcnt_data |
Defines | |
#define | KEY_DEV_HANDLE 1 |
#define | KEY_FS_HANDLE 0 |
#define | KEY_INDEX 2 |
#define | NODES_BUCKETS (1 << NODES_BUCKETS_LOG) |
#define | NODES_BUCKETS_LOG 8 |
Functions | |
static void | _vfs_node_addref (vfs_node_t *node) |
FIBRIL_MUTEX_INITIALIZE (nodes_mutex) | |
Mutex protecting the VFS node hash table. | |
static int | nodes_compare (unsigned long key[], hash_count_t keys, link_t *item) |
static hash_index_t | nodes_hash (unsigned long key[]) |
static void | nodes_remove_callback (link_t *item) |
static void | refcnt_visitor (link_t *item, void *arg) |
void | vfs_node_addref (vfs_node_t *node) |
Increment reference count of a VFS node. | |
void | vfs_node_delref (vfs_node_t *node) |
Decrement reference count of a VFS node. | |
void | vfs_node_forget (vfs_node_t *node) |
Forget node. | |
vfs_node_t * | vfs_node_get (vfs_lookup_res_t *result) |
Find VFS node. | |
void | vfs_node_put (vfs_node_t *node) |
Return VFS node when no longer needed by the caller. | |
bool | vfs_nodes_init (void) |
Initialize the VFS node hash table. | |
unsigned | vfs_nodes_refcount_sum_get (fs_handle_t, devmap_handle_t) |
Variables | |
hash_table_t | nodes |
VFS node hash table containing all active, in-memory VFS nodes. | |
hash_table_operations_t | nodes_ops |
VFS node hash table operations. |
Definition in file vfs_node.c.