Struct SuperBlockHeaderV32

Source
pub struct SuperBlockHeaderV32 {
    pub generation: u64,
    pub root_parent_store_object_id: u64,
    pub root_parent_graveyard_directory_object_id: u64,
    pub root_store_object_id: u64,
    pub allocator_object_id: u64,
    pub journal_object_id: u64,
    pub journal_checkpoint: JournalCheckpointV32,
    pub super_block_journal_file_offset: u64,
    pub journal_file_offsets: FxHashMap<u64, u64>,
    pub borrowed_metadata_space: u64,
    pub earliest_version: Version,
    /* private fields */
}

Fields§

§generation: u64

There are two super-blocks which are used in an A/B configuration. The super-block with the greatest generation number is what is used when mounting an Fxfs image; the other is discarded.

§root_parent_store_object_id: u64

The root parent store is an in-memory only store and serves as the backing store for the root store and the journal. The records for this store are serialized into the super-block and mutations are also recorded in the journal.

§root_parent_graveyard_directory_object_id: u64

The root parent needs a graveyard and there’s nowhere else to store it other than in the super-block.

§root_store_object_id: u64

The root object store contains all other metadata objects (including the allocator, the journal and the super-blocks) and is the parent for all other object stores.

§allocator_object_id: u64

This is in the root object store.

§journal_object_id: u64

This is in the root parent object store.

§journal_checkpoint: JournalCheckpointV32

Start checkpoint for the journal file.

§super_block_journal_file_offset: u64

Offset of the journal file when the super-block was written. If no entry is present in journal_file_offsets for a particular object, then an object might have dependencies on the journal from super_block_journal_file_offset onwards, but not earlier.

§journal_file_offsets: FxHashMap<u64, u64>

object id -> journal file offset. Indicates where each object has been flushed to.

§borrowed_metadata_space: u64

Records the amount of borrowed metadata space as applicable at super_block_journal_file_offset.

§earliest_version: Version

The earliest version of Fxfs used to create any still-existing struct in the filesystem.

Note: structs in the filesystem may had been made with various different versions of Fxfs.

Implementations§

Source§

impl SuperBlockHeaderV32

Source

pub fn new( root_parent_store_object_id: u64, root_parent_graveyard_directory_object_id: u64, root_store_object_id: u64, allocator_object_id: u64, journal_object_id: u64, journal_checkpoint: JournalCheckpoint, earliest_version: Version, ) -> Self

Creates a new instance with random GUID.

Trait Implementations§

Source§

impl Clone for SuperBlockHeaderV32

Source§

fn clone(&self) -> SuperBlockHeaderV32

Returns a copy 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 SuperBlockHeaderV32

Source§

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

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

impl Default for SuperBlockHeaderV32

Source§

fn default() -> SuperBlockHeaderV32

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

impl<'de> Deserialize<'de> for SuperBlockHeaderV32

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for SuperBlockHeaderV32

Source§

fn eq(&self, other: &SuperBlockHeaderV32) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for SuperBlockHeaderV32

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl TypeFingerprint for SuperBlockHeaderV32

Source§

impl Versioned for SuperBlockHeaderV32

Source§

fn max_serialized_size() -> u64

Source§

fn deserialize_from<R>(reader: &mut R, _version: Version) -> Result<Self>
where R: Read + ?Sized, for<'de> Self: Deserialize<'de>,

Source§

fn serialize_into<W>(&self, writer: &mut W) -> Result<()>
where W: Write, Self: Serialize,

Source§

impl Eq for SuperBlockHeaderV32

Source§

impl StructuralPartialEq for SuperBlockHeaderV32

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, dst: *mut u8)

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

impl<T, D> Encode<Ambiguous1, D> for T
where D: ResourceDialect,

Source§

unsafe fn encode( self, _encoder: &mut Encoder<'_, D>, _offset: usize, _depth: Depth, ) -> Result<(), Error>

Encodes the object into the encoder’s buffers. Any handles stored in the object are swapped for Handle::INVALID. Read more
Source§

impl<T, D> Encode<Ambiguous2, D> for T
where D: ResourceDialect,

Source§

unsafe fn encode( self, _encoder: &mut Encoder<'_, D>, _offset: usize, _depth: Depth, ) -> Result<(), Error>

Encodes the object into the encoder’s buffers. Any handles stored in the object are swapped for Handle::INVALID. 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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<V> LayerValue for V
where V: Clone + Send + Sync + Versioned + VersionedLatest + Debug + Unpin + 'static,