|
PatchworkOS
|
#include <inode.h>
Data Fields | |
| uint64_t(* | lookup )(inode_t *dir, dentry_t *target) |
| Should set the target dentry to be positive (give it an inode), if the entry does not exist the operation should still return success and leave the dentry as negative, if other errors occur it should return ERR and set errno. | |
| uint64_t(* | create )(inode_t *dir, dentry_t *target, path_flags_t flags) |
| Handles both directories and files, works the same as lookup. | |
| void(* | truncate )(inode_t *target) |
| uint64_t(* | link )(dentry_t *old, inode_t *dir, dentry_t *target) |
| uint64_t(* | remove )(inode_t *parent, dentry_t *target, path_flags_t flags) |
| Handles both directories and files. | |
| void(* | cleanup )(inode_t *inode) |
Inode operations structure.
Note that the inodes mutex will be acquired by the vfs.
| void(* inode_ops_t::cleanup) (inode_t *inode) |
Definition at line 98 of file inode.h.
Referenced by inode_free().
| uint64_t(* inode_ops_t::create) (inode_t *dir, dentry_t *target, path_flags_t flags) |
Handles both directories and files, works the same as lookup.
Definition at line 91 of file inode.h.
Referenced by vfs_create().
Definition at line 93 of file inode.h.
Referenced by vfs_link().
Should set the target dentry to be positive (give it an inode), if the entry does not exist the operation should still return success and leave the dentry as negative, if other errors occur it should return ERR and set errno.
Definition at line 87 of file inode.h.
Referenced by vfs_get_or_lookup_dentry().
| uint64_t(* inode_ops_t::remove) (inode_t *parent, dentry_t *target, path_flags_t flags) |
Handles both directories and files.
Definition at line 97 of file inode.h.
Referenced by vfs_remove().
| void(* inode_ops_t::truncate) (inode_t *target) |
Definition at line 92 of file inode.h.
Referenced by inode_truncate().