MOS Source Code
Loading...
Searching...
No Matches
dentry.h File Reference
+ Include dependency graph for dentry.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef void dump_refstat_receiver_t(int depth, const dentry_t *dentry, bool mountroot, void *data)
 

Enumerations

enum  lastseg_resolve_flags_t {
  RESOLVE_EXPECT_FILE = 1 << 0 , RESOLVE_EXPECT_DIR = 1 << 1 , RESOLVE_EXPECT_ANY_TYPE = RESOLVE_EXPECT_FILE | RESOLVE_EXPECT_DIR , RESOLVE_SYMLINK_NOFOLLOW = 1 << 2 ,
  RESOLVE_EXPECT_EXIST = 1 << 3 , RESOLVE_EXPECT_NONEXIST = 1 << 4 , RESOLVE_EXPECT_ANY_EXIST = RESOLVE_EXPECT_EXIST | RESOLVE_EXPECT_NONEXIST
}
 

Functions

should_inline bool path_is_absolute (const char *path)
 Check if a path is absolute.
 
should_inline dentry_tdentry_parent (const dentry_t *dentry)
 
void dentry_check_refstat (const dentry_t *dentry)
 Check the reference count of a dentry.
 
void dentry_dump_refstat (const dentry_t *dentry, dump_refstat_receiver_t receiver, void *data)
 
dentry_tdentry_ref (dentry_t *dentry)
 Increment the reference count of a dentry.
 
dentry_tdentry_ref_up_to (dentry_t *dentry, dentry_t *root)
 Increment the reference count of a dentry up to a given dentry.
 
void dentry_unref (dentry_t *dentry)
 Decrement the reference count of a dentry.
 
__nodiscard bool dentry_unref_one_norelease (dentry_t *dentry)
 Decrease the refcount of ONE SINGLE dentry, including (if it's a mountpoint) the mountpoint dentry.
 
void dentry_try_release (dentry_t *dentry)
 
void dentry_attach (dentry_t *d, inode_t *inode)
 Attach an inode to a dentry.
 
void dentry_detach (dentry_t *dentry)
 Detach the inode from a dentry.
 
dentry_tdentry_from_fd (fd_t fd)
 Get the dentry from a file descriptor.
 
dentry_tdentry_lookup_child (dentry_t *parent, const char *name)
 Get a child dentry from a parent dentry.
 
dentry_tdentry_resolve (dentry_t *starting_dir, dentry_t *root_dir, const char *path, lastseg_resolve_flags_t flags)
 Lookup a path in the filesystem.
 
__nodiscard bool dentry_mount (dentry_t *mountpoint, dentry_t *root, filesystem_t *fs)
 Mount a filesystem at a mountpoint.
 
__nodiscard dentry_tdentry_unmount (dentry_t *root)
 Unmount a filesystem at the mountpoint.
 
void vfs_populate_listdir_buf (dentry_t *dir, vfs_listdir_state_t *state)
 List the contents of a directory.
 
ssize_t dentry_path (dentry_t *dentry, dentry_t *root, char *buf, size_t size)
 Get the path of a dentry.