Struct btrfs_root_item

Source
#[repr(C, packed(1))]
pub struct btrfs_root_item {
Show 25 fields pub inode: btrfs_inode_item, pub generation: c_ulonglong, pub root_dirid: c_ulonglong, pub bytenr: c_ulonglong, pub byte_limit: c_ulonglong, pub bytes_used: c_ulonglong, pub last_snapshot: c_ulonglong, pub flags: c_ulonglong, pub refs: c_uint, pub drop_progress: btrfs_disk_key, pub drop_level: c_uchar, pub level: c_uchar, pub generation_v2: c_ulonglong, pub uuid: [c_uchar; 16], pub parent_uuid: [c_uchar; 16], pub received_uuid: [c_uchar; 16], pub ctransid: c_ulonglong, pub otransid: c_ulonglong, pub stransid: c_ulonglong, pub rtransid: c_ulonglong, pub ctime: btrfs_timespec, pub otime: btrfs_timespec, pub stime: btrfs_timespec, pub rtime: btrfs_timespec, pub reserved: [c_ulonglong; 8],
}

Fields§

§inode: btrfs_inode_item§generation: c_ulonglong§root_dirid: c_ulonglong§bytenr: c_ulonglong§byte_limit: c_ulonglong§bytes_used: c_ulonglong§last_snapshot: c_ulonglong§flags: c_ulonglong§refs: c_uint§drop_progress: btrfs_disk_key§drop_level: c_uchar§level: c_uchar§generation_v2: c_ulonglong

The following fields appear after subvol_uuids+subvol_times were introduced. This generation number is used to test if the new fields are valid and up to date while reading the root item. Every time the root item is written out, the “generation” field is copied into this field. If anyone ever mounted the fs with an older kernel, we will have mismatching generation values here and thus must invalidate the new fields. See btrfs_update_root and btrfs_find_last_root for details. the offset of generation_v2 is also used as the start for the memset when invalidating the fields.

§uuid: [c_uchar; 16]§parent_uuid: [c_uchar; 16]§received_uuid: [c_uchar; 16]§ctransid: c_ulonglong

updated when an inode changes

§otransid: c_ulonglong

trans when created

§stransid: c_ulonglong

trans when sent. non-zero for received subvol

§rtransid: c_ulonglong

trans when received. non-zero for received subvol

§ctime: btrfs_timespec§otime: btrfs_timespec§stime: btrfs_timespec§rtime: btrfs_timespec§reserved: [c_ulonglong; 8]

for future

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> 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, 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.