Max OS 0.3
Loading...
Searching...
No Matches
MaxOS::filesystem::format::ext2::SuperBlock Struct Reference

The metadata of the ext2 filesystem. Found at an offset of 1024 bytes from the start of the partition. More...

#include <ext2.h>

Public Attributes

uint32_t total_inodes
 Total number of inodes.
 
uint32_t total_blocks
 Total number of blocks.
 
uint32_t reserved_blocks
 Number of reserved blocks for superuser.
 
uint32_t unallocated_blocks
 Number of free blocks.
 
uint32_t unallocated_inodes
 Number of free inodes.
 
uint32_t starting_block
 Where the superblock starts (normally 0 but not always)
 
uint32_t block_size
 Block size (as a power of 2, so 1024 << block_size)
 
uint32_t fragment_size
 Fragment size (as a power of 2, so 1024 << fragment_size)
 
uint32_t blocks_per_group
 Number of blocks per group.
 
uint32_t fragments_per_group
 Number of fragments per group.
 
uint32_t inodes_per_group
 Number of inodes per group.
 
uint32_t last_mount_time
 Last time the filesystem was mounted (in seconds since the epoch)
 
uint32_t late_write_time
 Last time a block was written to (in seconds since the epoch)
 
uint16_t mounts_since_check
 Number of mounts since the last consistency check.
 
uint16_t mounts_until_check
 Number of mounts allowed before a consistency check is needed (fsck)
 
uint16_t signature
 Filesystem magic signature (0xEF53)
 
uint16_t state
 The state of the filesystem (see FileSystemState)
 
uint16_t error_operation
 What to do when an error is detected (see ErrorOperation)
 
uint16_t version_minor
 Minor version number (combined with version_major to make version number)
 
uint32_t last_check_time
 Time of last consistency check (in seconds since the epoch)
 
uint32_t time_until_check
 Maximum time between checks (in seconds)
 
uint32_t os_id
 ID of the OS which created the filesystem (see CreatorOS)
 
uint32_t version_major
 Major version number (combined with version_minor to make version number)
 
uint16_t reserved_user
 User ID that can use reserved blocks.
 
uint16_t reserved_group
 Group ID that can use reserved blocks.
 
uint32_t first_inode
 Number of the first non-reserved inode (version < 1 this is 11)
 
uint16_t inode_size
 Size of each inode structure (version < 1 this is 128 bytes)
 
uint16_t superblock_group
 If there is a backup superblock, which group it is stored in.
 
uint32_t optional_features
 Features that are not required for read/write support but can help performance (see OptionalFeatures)
 
uint32_t required_features
 Features that must be present for read/write support (see RequiredFeatures)
 
uint16_t read_only_features
 Features that are only required in read-only mode (see ReadOnlyFeatures)
 
uint8_t filesystem_id [16]
 A unique identifier for the filesystem.
 
uint8_t volume_name [16]
 The volume name (is null-terminated)
 
uint8_t last_mount_path [64]
 The path where the filesystem was last mounted (is null-terminated)
 
uint32_t compression
 Compression algorithm used (0 = none, see RequiredFeatures)
 
uint8_t file_preallocation_blocks
 How many blocks should be allocated when creating a file.
 
uint8_t directory_preallocation_blocks
 How many blocks should be allocated when creating a directory.
 
uint16_t unused
 Reserved.
 
uint8_t journal_id [16]
 A unique identifier for the journal.
 
uint32_t journal_inode
 The inode number of the journal file.
 
uint32_t journal_device
 The device number of the journal file.
 
uint32_t orphan_inodes_start
 The start of the list of inodes without a directory entry that need to be deleted.
 
uint8_t free [276]
 Reserved for future expansion.
 

Detailed Description

The metadata of the ext2 filesystem. Found at an offset of 1024 bytes from the start of the partition.

Definition at line 30 of file ext2.h.

Member Data Documentation

◆ block_size

uint32_t MaxOS::filesystem::format::ext2::SuperBlock::block_size

Block size (as a power of 2, so 1024 << block_size)

Definition at line 37 of file ext2.h.

◆ blocks_per_group

uint32_t MaxOS::filesystem::format::ext2::SuperBlock::blocks_per_group

Number of blocks per group.

Definition at line 39 of file ext2.h.

◆ compression

uint32_t MaxOS::filesystem::format::ext2::SuperBlock::compression

Compression algorithm used (0 = none, see RequiredFeatures)

Definition at line 67 of file ext2.h.

◆ directory_preallocation_blocks

uint8_t MaxOS::filesystem::format::ext2::SuperBlock::directory_preallocation_blocks

How many blocks should be allocated when creating a directory.

Definition at line 69 of file ext2.h.

◆ error_operation

uint16_t MaxOS::filesystem::format::ext2::SuperBlock::error_operation

What to do when an error is detected (see ErrorOperation)

Definition at line 48 of file ext2.h.

◆ file_preallocation_blocks

uint8_t MaxOS::filesystem::format::ext2::SuperBlock::file_preallocation_blocks

How many blocks should be allocated when creating a file.

Definition at line 68 of file ext2.h.

◆ filesystem_id

uint8_t MaxOS::filesystem::format::ext2::SuperBlock::filesystem_id[16]

A unique identifier for the filesystem.

Definition at line 64 of file ext2.h.

◆ first_inode

uint32_t MaxOS::filesystem::format::ext2::SuperBlock::first_inode

Number of the first non-reserved inode (version < 1 this is 11)

Definition at line 58 of file ext2.h.

◆ fragment_size

uint32_t MaxOS::filesystem::format::ext2::SuperBlock::fragment_size

Fragment size (as a power of 2, so 1024 << fragment_size)

Definition at line 38 of file ext2.h.

◆ fragments_per_group

uint32_t MaxOS::filesystem::format::ext2::SuperBlock::fragments_per_group

Number of fragments per group.

Definition at line 40 of file ext2.h.

◆ free

uint8_t MaxOS::filesystem::format::ext2::SuperBlock::free[276]

Reserved for future expansion.

Definition at line 75 of file ext2.h.

◆ inode_size

uint16_t MaxOS::filesystem::format::ext2::SuperBlock::inode_size

Size of each inode structure (version < 1 this is 128 bytes)

Definition at line 59 of file ext2.h.

◆ inodes_per_group

uint32_t MaxOS::filesystem::format::ext2::SuperBlock::inodes_per_group

Number of inodes per group.

Definition at line 41 of file ext2.h.

◆ journal_device

uint32_t MaxOS::filesystem::format::ext2::SuperBlock::journal_device

The device number of the journal file.

Definition at line 73 of file ext2.h.

◆ journal_id

uint8_t MaxOS::filesystem::format::ext2::SuperBlock::journal_id[16]

A unique identifier for the journal.

Definition at line 71 of file ext2.h.

◆ journal_inode

uint32_t MaxOS::filesystem::format::ext2::SuperBlock::journal_inode

The inode number of the journal file.

Definition at line 72 of file ext2.h.

◆ last_check_time

uint32_t MaxOS::filesystem::format::ext2::SuperBlock::last_check_time

Time of last consistency check (in seconds since the epoch)

Definition at line 50 of file ext2.h.

◆ last_mount_path

uint8_t MaxOS::filesystem::format::ext2::SuperBlock::last_mount_path[64]

The path where the filesystem was last mounted (is null-terminated)

Definition at line 66 of file ext2.h.

◆ last_mount_time

uint32_t MaxOS::filesystem::format::ext2::SuperBlock::last_mount_time

Last time the filesystem was mounted (in seconds since the epoch)

Definition at line 42 of file ext2.h.

◆ late_write_time

uint32_t MaxOS::filesystem::format::ext2::SuperBlock::late_write_time

Last time a block was written to (in seconds since the epoch)

Definition at line 43 of file ext2.h.

◆ mounts_since_check

uint16_t MaxOS::filesystem::format::ext2::SuperBlock::mounts_since_check

Number of mounts since the last consistency check.

Definition at line 44 of file ext2.h.

◆ mounts_until_check

uint16_t MaxOS::filesystem::format::ext2::SuperBlock::mounts_until_check

Number of mounts allowed before a consistency check is needed (fsck)

Definition at line 45 of file ext2.h.

◆ optional_features

uint32_t MaxOS::filesystem::format::ext2::SuperBlock::optional_features

Features that are not required for read/write support but can help performance (see OptionalFeatures)

Definition at line 61 of file ext2.h.

◆ orphan_inodes_start

uint32_t MaxOS::filesystem::format::ext2::SuperBlock::orphan_inodes_start

The start of the list of inodes without a directory entry that need to be deleted.

Definition at line 74 of file ext2.h.

◆ os_id

uint32_t MaxOS::filesystem::format::ext2::SuperBlock::os_id

ID of the OS which created the filesystem (see CreatorOS)

Definition at line 52 of file ext2.h.

◆ read_only_features

uint16_t MaxOS::filesystem::format::ext2::SuperBlock::read_only_features

Features that are only required in read-only mode (see ReadOnlyFeatures)

Definition at line 63 of file ext2.h.

◆ required_features

uint32_t MaxOS::filesystem::format::ext2::SuperBlock::required_features

Features that must be present for read/write support (see RequiredFeatures)

Definition at line 62 of file ext2.h.

◆ reserved_blocks

uint32_t MaxOS::filesystem::format::ext2::SuperBlock::reserved_blocks

Number of reserved blocks for superuser.

Definition at line 33 of file ext2.h.

◆ reserved_group

uint16_t MaxOS::filesystem::format::ext2::SuperBlock::reserved_group

Group ID that can use reserved blocks.

Definition at line 55 of file ext2.h.

◆ reserved_user

uint16_t MaxOS::filesystem::format::ext2::SuperBlock::reserved_user

User ID that can use reserved blocks.

Definition at line 54 of file ext2.h.

◆ signature

uint16_t MaxOS::filesystem::format::ext2::SuperBlock::signature

Filesystem magic signature (0xEF53)

Definition at line 46 of file ext2.h.

◆ starting_block

uint32_t MaxOS::filesystem::format::ext2::SuperBlock::starting_block

Where the superblock starts (normally 0 but not always)

Definition at line 36 of file ext2.h.

◆ state

uint16_t MaxOS::filesystem::format::ext2::SuperBlock::state

The state of the filesystem (see FileSystemState)

Definition at line 47 of file ext2.h.

◆ superblock_group

uint16_t MaxOS::filesystem::format::ext2::SuperBlock::superblock_group

If there is a backup superblock, which group it is stored in.

Definition at line 60 of file ext2.h.

◆ time_until_check

uint32_t MaxOS::filesystem::format::ext2::SuperBlock::time_until_check

Maximum time between checks (in seconds)

Definition at line 51 of file ext2.h.

◆ total_blocks

uint32_t MaxOS::filesystem::format::ext2::SuperBlock::total_blocks

Total number of blocks.

Definition at line 32 of file ext2.h.

◆ total_inodes

uint32_t MaxOS::filesystem::format::ext2::SuperBlock::total_inodes

Total number of inodes.

Definition at line 31 of file ext2.h.

◆ unallocated_blocks

uint32_t MaxOS::filesystem::format::ext2::SuperBlock::unallocated_blocks

Number of free blocks.

Definition at line 34 of file ext2.h.

◆ unallocated_inodes

uint32_t MaxOS::filesystem::format::ext2::SuperBlock::unallocated_inodes

Number of free inodes.

Definition at line 35 of file ext2.h.

◆ unused

uint16_t MaxOS::filesystem::format::ext2::SuperBlock::unused

Reserved.

Definition at line 70 of file ext2.h.

◆ version_major

uint32_t MaxOS::filesystem::format::ext2::SuperBlock::version_major

Major version number (combined with version_minor to make version number)

Definition at line 53 of file ext2.h.

◆ version_minor

uint16_t MaxOS::filesystem::format::ext2::SuperBlock::version_minor

Minor version number (combined with version_major to make version number)

Definition at line 49 of file ext2.h.

◆ volume_name

uint8_t MaxOS::filesystem::format::ext2::SuperBlock::volume_name[16]

The volume name (is null-terminated)

Definition at line 65 of file ext2.h.


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