PatchworkOS
Loading...
Searching...
No Matches
inode_ops_t Struct Reference

#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)
 

Detailed Description

Inode operations structure.

Note that the inodes mutex will be acquired by the vfs.

Definition at line 80 of file inode.h.

Field Documentation

◆ cleanup

void(* inode_ops_t::cleanup) (inode_t *inode)

Definition at line 98 of file inode.h.

Referenced by inode_free().

◆ create

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().

◆ link

uint64_t(* inode_ops_t::link) (dentry_t *old, inode_t *dir, dentry_t *target)

Definition at line 93 of file inode.h.

Referenced by vfs_link().

◆ lookup

uint64_t(* inode_ops_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.

Definition at line 87 of file inode.h.

Referenced by vfs_get_or_lookup_dentry().

◆ remove

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().

◆ truncate

void(* inode_ops_t::truncate) (inode_t *target)

Definition at line 92 of file inode.h.

Referenced by inode_truncate().


The documentation for this struct was generated from the following file: