MOS Source Code
Loading...
Searching...
No Matches
vfs_types.h File Reference
#include "mos/lib/sync/mutex.h"
#include "mos/mm/mm.h"
#include "mos/mm/physical/pmm.h"
#include "mos/mm/slab.h"
#include <abi-bits/stat.h>
#include <mos/filesystem/fs_types.h>
#include <mos/io/io.h>
#include <mos/io/io_types.h>
#include <mos/lib/structures/hashmap.h>
#include <mos/lib/structures/list.h>
#include <mos/lib/structures/tree.h>
#include <mos/lib/sync/spinlock.h>
#include <mos/platform/platform.h>
#include <mos/types.h>
+ Include dependency graph for vfs_types.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  vfs_listdir_entry_t
 
struct  vfs_listdir_state_t
 
struct  inode_ops_t
 
struct  file_ops_t
 
struct  superblock_ops_t
 
struct  superblock_t
 
struct  dentry_t
 
struct  inode_cache_ops_t
 
struct  inode_cache_t
 
struct  inode_t
 
struct  filesystem_t
 
struct  mount_t
 
struct  file_t
 

Macros

#define FILESYSTEM_DEFINE(var, fsname, mountfn, unmountfn)
 
#define FILESYSTEM_AUTOREGISTER(fs)
 
#define dentry_name(dentry)
 

Typedefs

typedef struct _dentry dentry_t
 
typedef struct _inode_cache inode_cache_t
 
typedef struct _inode inode_t
 
typedef struct _mount mount_t
 
typedef struct _superblock superblock_t
 
typedef struct _filesystem filesystem_t
 
typedef struct _file file_t
 
typedef void dentry_iterator_op(vfs_listdir_state_t *state, u64 ino, const char *name, size_t name_len, file_type_t type)
 

Variables

dentry_troot_dentry
 
slab_tsuperblock_cache
 
slab_tmount_cache
 
slab_tfile_cache
 

Macro Definition Documentation

◆ FILESYSTEM_DEFINE

#define FILESYSTEM_DEFINE ( var,
fsname,
mountfn,
unmountfn )
Value:
filesystem_t var = { \
.list_node = LIST_HEAD_INIT(var.list_node), \
.name = fsname, \
.mount = mountfn, \
.unmount = unmountfn, \
}
#define LIST_HEAD_INIT(container)
Definition list.h:38

Definition at line 21 of file vfs_types.h.

◆ FILESYSTEM_AUTOREGISTER

#define FILESYSTEM_AUTOREGISTER ( fs)
Value:
static void __register_##fs() \
{ \
vfs_register_filesystem(&fs); \
} \
MOS_INIT(VFS, __register_##fs)

Definition at line 29 of file vfs_types.h.

◆ dentry_name

Typedef Documentation

◆ dentry_t

typedef struct _dentry dentry_t

Definition at line 36 of file vfs_types.h.

◆ inode_cache_t

typedef struct _inode_cache inode_cache_t

Definition at line 37 of file vfs_types.h.

◆ inode_t

typedef struct _inode inode_t

Definition at line 38 of file vfs_types.h.

◆ mount_t

typedef struct _mount mount_t

Definition at line 39 of file vfs_types.h.

◆ superblock_t

typedef struct _superblock superblock_t

Definition at line 40 of file vfs_types.h.

◆ filesystem_t

typedef struct _filesystem filesystem_t

Definition at line 41 of file vfs_types.h.

◆ file_t

typedef struct _file file_t

Definition at line 42 of file vfs_types.h.

◆ dentry_iterator_op

typedef void dentry_iterator_op(vfs_listdir_state_t *state, u64 ino, const char *name, size_t name_len, file_type_t type)

Definition at line 60 of file vfs_types.h.

Variable Documentation

◆ superblock_cache

slab_t* superblock_cache
extern

Definition at line 38 of file vfs.c.

Referenced by cpio_mount(), MOS_INIT(), and userfs_fsop_mount().

◆ mount_cache

slab_t * mount_cache

Definition at line 206 of file vfs_types.h.

◆ file_cache

slab_t * file_cache

Definition at line 206 of file vfs_types.h.