PatchworkOS  966e257
A non-POSIX operating system.
Loading...
Searching...
No Matches
superblock_ops_t Struct Reference

Superblock operations structure. More...

#include <superblock.h>

Collaboration diagram for superblock_ops_t:

Data Fields

inode_t *(* allocInode )(superblock_t *superblock)
 
void(* freeInode )(superblock_t *superblock, inode_t *inode)
 
void(* cleanup )(superblock_t *superblock)
 
void(* unmount )(superblock_t *superblock)
 

Detailed Description

Superblock operations structure.

Definition at line 69 of file superblock.h.

Field Documentation

◆ allocInode

inode_t *(* superblock_ops_t::allocInode) (superblock_t *superblock)

Called when the VFS needs to create a new inode, if not specified heap_alloc() is used. This is usefull as it lets filesystems allocate a structure larget than inode_t and use the additional space for private data in addition to the private pointer in inode_t.

Definition at line 76 of file superblock.h.

◆ freeInode

void(* superblock_ops_t::freeInode) (superblock_t *superblock, inode_t *inode)

Called when the VFS wants to free an inode, if not specified free() is used.

Definition at line 80 of file superblock.h.

◆ cleanup

void(* superblock_ops_t::cleanup) (superblock_t *superblock)

Called when the filesystem is superblock is being freed to give the filesystem a chance to clean up any private data.

Definition at line 85 of file superblock.h.

◆ unmount

void(* superblock_ops_t::unmount) (superblock_t *superblock)

Called when the the superblocks mountCount reaches zero, meaning it is not visible anywhere in any namespace.

Definition at line 89 of file superblock.h.


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