#include <lunaix/ds/llist.h>
#include <lunaix/ds/lru.h>
#include <lunaix/ds/mutex.h>
-#include <lunaix/process.h>
#include <lunaix/status.h>
#include <stdatomic.h>
#define FSTYPE_ROFS 0x1
-#define DO_STATUS(errno) SYSCALL_ESTATUS(__current->k_status = errno)
-#define DO_STATUS_OR_RETURN(errno) ({ errno < 0 ? DO_STATUS(errno) : errno; })
-
#define TEST_FD(fd) (fd >= 0 && fd < VFS_MAX_FD)
#define VFS_VALID_CHAR(chr) \
struct device* dev;
struct v_dnode* root;
struct filesystem* fs;
- u32_t iobuf_size;
struct hbucket* i_cache;
void* data;
struct
struct pcache* pg_cache;
struct v_inode_ops* ops;
struct v_file_ops* default_fops;
+
+ void (*destruct)(struct v_inode* inode);
};
struct v_mount
void
vfs_ref_dnode(struct v_dnode* dnode);
+void
+vfs_ref_file(struct v_file* file);
+
void
vfs_unref_dnode(struct v_dnode* dnode);