Skip to main content

SuperBlock

Struct SuperBlock 

Source
pub struct SuperBlock {
Show 98 fields pub inodes_count: u32, pub blocks_count_lo: u32, pub r_blocks_count_lo: u32, pub free_blocks_count_lo: u32, pub free_inodes_count: u32, pub first_data_block: u32, pub log_block_size: u32, pub log_cluster_size: u32, pub blocks_per_group: u32, pub clusters_per_group: u32, pub inodes_per_group: u32, pub mtime: u32, pub wtime: u32, pub mount_count: u16, pub max_mount_count: u16, pub magic: u16, pub state: u16, pub errors: u16, pub minor_rev_level: u16, pub lastcheck: u32, pub check_interval: u32, pub creator_os: u32, pub rev_level: u32, pub def_resuid: u16, pub def_resgid: u16, pub first_ino: u32, pub inode_size: u16, pub block_group_nr: u16, pub feature_compat: u32, pub feature_incompat: u32, pub feature_ro_compat: u32, pub uuid: [u8; 16], pub volume_name: [u8; 16], pub last_mounted: [u8; 64], pub algorithm_usage_bitmap: u32, pub prealloc_blocks: u8, pub prealloc_dir_blocks: u8, pub reserved_gdt_blocks: u16, pub journal_uuid: [u8; 16], pub journal_inum: u32, pub journal_dev: u32, pub last_orphan: u32, pub hash_seed: [u32; 4], pub def_hash_version: u8, pub journal_backup_type: u8, pub desc_size: u16, pub default_mount_opts: u32, pub first_meta_bg: u32, pub mkfs_time: u32, pub journal_blocks: [u32; 17], pub blocks_count_hi: u32, pub r_blocks_count_hi: u32, pub free_blocks_count_hi: u32, pub min_extra_isize: u16, pub want_extra_isize: u16, pub flags: u32, pub raid_stride: u16, pub mmp_interval: u16, pub mmp_block: u64, pub raid_stripe_width: u32, pub log_groups_per_flex: u8, pub checksum_type: u8, pub reserved_pad: u16, pub kbytes_written: u64, pub snapshot_inum: u32, pub snapshot_id: u32, pub snapshot_r_blocks_count: u64, pub snapshot_list: u32, pub error_count: u32, pub first_error_time: u32, pub first_error_ino: u32, pub first_error_block: u64, pub first_error_func: [u8; 32], pub first_error_line: u32, pub last_error_time: u32, pub last_error_ino: u32, pub last_error_line: u32, pub last_error_block: u64, pub last_error_func: [u8; 32], pub mount_opts: [u8; 64], pub usr_quota_inum: u32, pub grp_quota_inum: u32, pub overhead_blocks: u32, pub backup_bgs: [u32; 2], pub encrypt_algos: [u8; 4], pub encrypt_pw_salt: [u8; 16], pub lpf_ino: u32, pub prj_quota_inum: u32, pub checksum_seed: u32, pub wtime_hi: u8, pub mtime_hi: u8, pub mkfs_time_hi: u8, pub lastcheck_hi: u8, pub first_error_time_hi: u8, pub last_error_time_hi: u8, pub pad: [u8; 2], pub reserved: [u32; 96], pub checksum: u32,
}

Fields§

§inodes_count: u32§blocks_count_lo: u32§r_blocks_count_lo: u32§free_blocks_count_lo: u32§free_inodes_count: u32§first_data_block: u32§log_block_size: u32§log_cluster_size: u32§blocks_per_group: u32§clusters_per_group: u32§inodes_per_group: u32§mtime: u32§wtime: u32§mount_count: u16§max_mount_count: u16§magic: u16§state: u16§errors: u16§minor_rev_level: u16§lastcheck: u32§check_interval: u32§creator_os: u32§rev_level: u32§def_resuid: u16§def_resgid: u16§first_ino: u32§inode_size: u16§block_group_nr: u16§feature_compat: u32§feature_incompat: u32§feature_ro_compat: u32§uuid: [u8; 16]§volume_name: [u8; 16]§last_mounted: [u8; 64]§algorithm_usage_bitmap: u32§prealloc_blocks: u8§prealloc_dir_blocks: u8§reserved_gdt_blocks: u16§journal_uuid: [u8; 16]§journal_inum: u32§journal_dev: u32§last_orphan: u32§hash_seed: [u32; 4]§def_hash_version: u8§journal_backup_type: u8§desc_size: u16§default_mount_opts: u32§first_meta_bg: u32§mkfs_time: u32§journal_blocks: [u32; 17]§blocks_count_hi: u32§r_blocks_count_hi: u32§free_blocks_count_hi: u32§min_extra_isize: u16§want_extra_isize: u16§flags: u32§raid_stride: u16§mmp_interval: u16§mmp_block: u64§raid_stripe_width: u32§log_groups_per_flex: u8§checksum_type: u8§reserved_pad: u16§kbytes_written: u64§snapshot_inum: u32§snapshot_id: u32§snapshot_r_blocks_count: u64§snapshot_list: u32§error_count: u32§first_error_time: u32§first_error_ino: u32§first_error_block: u64§first_error_func: [u8; 32]§first_error_line: u32§last_error_time: u32§last_error_ino: u32§last_error_line: u32§last_error_block: u64§last_error_func: [u8; 32]§mount_opts: [u8; 64]§usr_quota_inum: u32§grp_quota_inum: u32§overhead_blocks: u32§backup_bgs: [u32; 2]§encrypt_algos: [u8; 4]§encrypt_pw_salt: [u8; 16]§lpf_ino: u32§prj_quota_inum: u32§checksum_seed: u32§wtime_hi: u8§mtime_hi: u8§mkfs_time_hi: u8§lastcheck_hi: u8§first_error_time_hi: u8§last_error_time_hi: u8§pad: [u8; 2]§reserved: [u32; 96]§checksum: u32

Implementations§

Source§

impl SuperBlock

Source

pub const SIZE: usize = SUPERBLOCK_SIZE

Source

pub fn read_from(buf: &[u8]) -> Self

Deserialize a superblock from a 1024-byte buffer.

Source

pub fn write_to(&self, buf: &mut [u8])

Serialize this superblock into a 1024-byte buffer.

Trait Implementations§

Source§

impl Clone for SuperBlock

Source§

fn clone(&self) -> SuperBlock

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SuperBlock

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for SuperBlock

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.