|
AquilaOS documentation
How it works, and its code
|
The vnode cache: a filesystem's vnodes that are in use, by inode number, so that a file opened twice gets the same vnode. More...
Go to the source code of this file.
Functions | |
| static int | vcache_eq (void *_a, void *_b) |
| Says whether a cached vnode has the inode number _b points to. | |
| void | vcache_init (struct vcache *vcache) |
| Sets up an empty vnode cache. | |
| int | vcache_insert (struct vcache *vcache, struct vnode *vnode) |
| Adds a vnode to a cache. | |
| int | vcache_remove (struct vcache *vcache, struct vnode *vnode) |
| Takes a vnode out of a cache. | |
| struct vnode * | vcache_find (struct vcache *vcache, ino_t ino) |
| Finds the cached vnode of an inode. | |
The vnode cache: a filesystem's vnodes that are in use, by inode number, so that a file opened twice gets the same vnode.
Definition in file vcache.c.
|
static |
Says whether a cached vnode has the inode number _b points to.
Definition at line 12 of file vcache.c.
References vnode::ino, and vcache_eq().
Referenced by vcache_eq(), and vcache_init().
Finds the cached vnode of an inode.
| vcache | the cache |
| ino | the inode number |
Definition at line 80 of file vcache.c.
References hashmap_node::entry, hashmap_node::hash, vcache::hashmap, vnode::ino, NULL, and vcache_find().
Referenced by ext2_inode_build(), minix_inode_build(), procfs_close(), procfs_vget(), and vcache_find().
| void vcache_init | ( | struct vcache * | vcache | ) |
Sets up an empty vnode cache.
| vcache | the cache |
Definition at line 25 of file vcache.c.
References vcache::hashmap, vcache_eq(), and vcache_init().
Referenced by ext2_load(), minix_load(), procfs_init(), vcache_init(), and vcache_insert().
Adds a vnode to a cache.
| vcache | the cache, set up on first use |
| vnode | the vnode |
Definition at line 37 of file vcache.c.
References vcache::hashmap, vnode::ino, vcache_init(), and vcache_insert().
Referenced by ext2_inode_build(), minix_inode_build(), procfs_vget(), and vcache_insert().
Takes a vnode out of a cache.
| vcache | the cache |
| vnode | the vnode |
Definition at line 56 of file vcache.c.
References hashmap_node::hash, vcache::hashmap, vnode::ino, and vcache_remove().
Referenced by ext2_close(), procfs_close(), and vcache_remove().