MOS Source Code
|
#include "mos/filesystem/vfs_utils.h"
#include "mos/filesystem/dentry.h"
#include "mos/filesystem/page_cache.h"
#include "mos/filesystem/vfs_types.h"
#include "mos/lib/sync/spinlock.h"
#include "mos/mm/physical/pmm.h"
#include "mos/mm/slab.h"
#include "mos/mm/slab_autoinit.h"
#include <mos/lib/structures/hashmap_common.h>
#include <mos/types.h>
#include <mos_stdlib.h>
#include <mos_string.h>
Go to the source code of this file.
Functions | |
SLAB_AUTOINIT ("dentry", dentry_cache, dentry_t) | |
static dentry_t * | dentry_create (superblock_t *sb, dentry_t *parent, const char *name) |
dentry_t * | dentry_get_from_parent (superblock_t *sb, dentry_t *parent, const char *name) |
Create a new dentry with the given name and parent. | |
bool | simple_page_write_begin (inode_cache_t *icache, off_t offset, size_t size, phyframe_t **page, void **private) |
void | simple_page_write_end (inode_cache_t *icache, off_t offset, size_t size, phyframe_t *page, void *private) |
long | simple_flush_page_discard_data (inode_cache_t *icache, off_t pgoff, phyframe_t *page) |
ssize_t | vfs_generic_read (const file_t *file, void *buf, size_t size, off_t offset) |
ssize_t | vfs_generic_write (const file_t *file, const void *buf, size_t size, off_t offset) |
bool | vfs_simple_write_begin (inode_cache_t *icache, off_t offset, size_t size) |
void | vfs_generic_iterate_dir (const dentry_t *dir, vfs_listdir_state_t *state, dentry_iterator_op add_record) |
Variables | |
slab_t * | dentry_cache |
SLAB_AUTOINIT | ( | "dentry" | , |
dentry_cache | , | ||
dentry_t | ) |
|
static |
Definition at line 21 of file vfs_utils.c.
Referenced by dentry_get_from_parent().
dentry_t * dentry_get_from_parent | ( | superblock_t * | sb, |
dentry_t * | parent, | ||
const char * | name ) |
Create a new dentry with the given name and parent.
sb | The superblock of the dentry |
parent | The parent dentry |
name | The name of the dentry |
Definition at line 40 of file vfs_utils.c.
Referenced by cpio_mount(), dentry_lookup_child(), memfd_create(), MOS_INIT(), sysfs_do_register(), sysfs_register_file(), tmpfs_fsop_mount(), and userfs_fsop_mount().
bool simple_page_write_begin | ( | inode_cache_t * | icache, |
off_t | offset, | ||
size_t | size, | ||
phyframe_t ** | page, | ||
void ** | private ) |
void simple_page_write_end | ( | inode_cache_t * | icache, |
off_t | offset, | ||
size_t | size, | ||
phyframe_t * | page, | ||
void * | private ) |
Definition at line 76 of file vfs_utils.c.
long simple_flush_page_discard_data | ( | inode_cache_t * | icache, |
off_t | pgoff, | ||
phyframe_t * | page ) |
Definition at line 86 of file vfs_utils.c.
Referenced by do_flush_and_drop_cached_page().
bool vfs_simple_write_begin | ( | inode_cache_t * | icache, |
off_t | offset, | ||
size_t | size ) |
Definition at line 112 of file vfs_utils.c.
void vfs_generic_iterate_dir | ( | const dentry_t * | dir, |
vfs_listdir_state_t * | state, | ||
dentry_iterator_op | add_record ) |
Definition at line 120 of file vfs_utils.c.
Referenced by sysfs_iops_iterate_dir(), and vfs_populate_listdir_buf().
slab_t* dentry_cache |
Definition at line 18 of file vfs_utils.c.
Referenced by dentry_create().