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

Superblock structure. More...

#include <superblock.h>

Data Fields

ref_t ref
 
list_entry_t entry
 
superblock_id_t id
 
uint64_t blockSize
 
uint64_t maxFileSize
 
void * private
 
dentry_troot
 
const superblock_ops_tops
 
const dentry_ops_tdentryOps
 
const filesystem_tfs
 
char deviceName [MAX_NAME]
 
atomic_uint64_t mountCount
 

Detailed Description

Superblock structure.

Superblocks are owned by the VFS, not the filesystem.

Definition at line 43 of file superblock.h.

Field Documentation

◆ blockSize

uint64_t superblock_t::blockSize

Definition at line 48 of file superblock.h.

Referenced by ramfs_mount(), and superblock_new().

◆ dentryOps

const dentry_ops_t* superblock_t::dentryOps

Definition at line 53 of file superblock.h.

Referenced by dentry_new(), and superblock_new().

◆ deviceName

char superblock_t::deviceName[MAX_NAME]

Definition at line 55 of file superblock.h.

Referenced by superblock_new().

◆ entry

list_entry_t superblock_t::entry

Definition at line 46 of file superblock.h.

Referenced by superblock_new(), and vfs_remove_superblock().

◆ fs

const filesystem_t* superblock_t::fs

◆ id

superblock_id_t superblock_t::id

Definition at line 47 of file superblock.h.

Referenced by superblock_new(), vfs_add_inode(), vfs_get_inode(), vfs_link(), and vfs_remove_inode().

◆ maxFileSize

uint64_t superblock_t::maxFileSize

Definition at line 49 of file superblock.h.

Referenced by ramfs_mount(), and superblock_new().

◆ mountCount

atomic_uint64_t superblock_t::mountCount

The number of mounts of this superblock.

Note that this does need to be separate from the reference count as a superblock is referenced by mounts, but it can also be referenced by other things like open files.

Definition at line 62 of file superblock.h.

Referenced by superblock_dec_mount_count(), superblock_free(), superblock_inc_mount_count(), and superblock_new().

◆ ops

const superblock_ops_t* superblock_t::ops

◆ private

void* superblock_t::private

◆ ref

ref_t superblock_t::ref

Definition at line 45 of file superblock.h.

Referenced by superblock_new().

◆ root

dentry_t* superblock_t::root

Definition at line 51 of file superblock.h.

Referenced by ramfs_mount(), superblock_free(), superblock_new(), and sysfs_mount().


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