13#ifdef RT_USING_PAGECACHE
17#define DBG_TAG "DFS.vnode"
18#define DBG_LVL DBG_WARNING
25 rt_memset(vnode, 0,
sizeof(
struct dfs_vnode));
41 LOG_E(
"create a vnode failed.");
47 LOG_I(
"create a vnode: %p", vnode);
63 LOG_I(
"free a vnode: %p", vnode);
64#ifdef RT_USING_PAGECACHE
67 dfs_aspace_destroy(vnode->
aspace);
77 DLOG(msg,
"vnode",
"vnode", DLOG_MSG,
"destroy vnode(mnt=NULL)");
117#ifdef RT_USING_PAGECACHE
120 dfs_aspace_destroy(vnode->
aspace);
125 LOG_I(
"free a vnode: %p", vnode);
126 DLOG(msg,
"vnode",
"vnode", DLOG_MSG,
"free vnode, ref_count=0");
int dfs_vnode_destroy(struct dfs_vnode *vnode)
void dfs_vnode_unref(struct dfs_vnode *vnode)
int dfs_vnode_init(struct dfs_vnode *vnode, int type, const struct dfs_file_ops *fops)
struct dfs_vnode * dfs_vnode_create(void)
struct dfs_vnode * dfs_vnode_ref(struct dfs_vnode *vnode)
void dfs_file_unlock(void)
rt_err_t dfs_file_lock(void)
rt_weak void * rt_calloc(rt_size_t count, rt_size_t size)
This function will contiguously allocate enough space for count objects that are size bytes of memory...
rt_weak void rt_free(void *ptr)
This function will release the previously allocated memory block by rt_malloc. The released memory bl...
#define rt_atomic_sub(ptr, v)
#define rt_atomic_add(ptr, v)
#define rt_atomic_store(ptr, v)
#define rt_atomic_load(ptr)
int(* free_vnode)(struct dfs_vnode *vnode)
const struct dfs_filesystem_ops * fs_ops
struct dfs_aspace * aspace
const struct dfs_file_ops * fops