#[repr(C, packed(1))]pub struct RootItem {Show 25 fields
pub inode: InodeItem,
pub generation: U64,
pub root_dirid: U64,
pub bytenr: U64,
pub byte_limit: U64,
pub bytes_used: U64,
pub last_snapshot: U64,
pub flags: U64,
pub refs: U32,
pub drop_progress: Key,
pub drop_level: u8,
pub level: u8,
pub generation_v2: U64,
pub uuid: UuidBytes,
pub parent_uuid: UuidBytes,
pub received_uuid: UuidBytes,
pub ctransid: U64,
pub otransid: U64,
pub stransid: U64,
pub rtransid: U64,
pub ctime: Time,
pub otime: Time,
pub stime: Time,
pub rtime: Time,
pub _unused: [u64; 8],
}
Expand description
Defines the location and parameters of the root of a b-tree.
Fields§
§inode: InodeItem
§generation: U64
§root_dirid: U64
§bytenr: U64
§byte_limit: U64
Currently unused. Always 0.
bytes_used: U64
Currently unused.
last_snapshot: U64
The transaction ID of the last transaction that created a snapshot of this root.
flags: U64
§refs: U32
Only 0 or 1. Historically contained a reference count.
drop_progress: Key
Contains the key of the last dropped item during subvolume removal or relocation.
Value will be zeroed out otherwise.
drop_level: u8
The tree level of the node referenced in drop_progress.
level: u8
The height of this root’s tree.
generation_v2: U64
Value to help determine whether this root has been modified by an older btrfs implementation.
If the value is equal to generation, the fields below are valid. Otherwise, this indicates the fields are invalid but recoverable.
uuid: UuidBytes
The subvolume’s UUID.
parent_uuid: UuidBytes
The parent’s subvolume UUID.
This is used during send/receive.
received_uuid: UuidBytes
The received UUID.
This is used during send/receive.
ctransid: U64
The transaction ID of the last transaction that modified the tree.
Note: some operations like internal caches or relocation will not update this value.
otransid: U64
The transaction ID of the transaction that created the tree.
stransid: U64
The transaction ID for the transaction that sent this subvolume.
This value is non-zero for a received subvolume.
rtransid: U64
The transaction ID for the transaction that received this subvolume.
This value is non-zero for a received subvolume.
ctime: Time
The timestamp of the ctransid
.
otime: Time
The timestamp of the otransid
.
stime: Time
The timestamp of the stransid
.
rtime: Time
The timestamp of the rtransid
.
_unused: [u64; 8]
Currently unused. Reserved for future use.
Trait Implementations§
Source§impl FromBytes for RootItem
impl FromBytes for RootItem
Source§fn mut_from_bytes(
source: &mut [u8],
) -> Result<&mut Self, ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, Infallible>>where
Self: IntoBytes + KnownLayout,
fn mut_from_bytes(
source: &mut [u8],
) -> Result<&mut Self, ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, Infallible>>where
Self: IntoBytes + KnownLayout,
Source§fn mut_from_prefix(
source: &mut [u8],
) -> Result<(&mut Self, &mut [u8]), ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, Infallible>>where
Self: IntoBytes + KnownLayout,
fn mut_from_prefix(
source: &mut [u8],
) -> Result<(&mut Self, &mut [u8]), ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, Infallible>>where
Self: IntoBytes + KnownLayout,
Source§fn mut_from_suffix(
source: &mut [u8],
) -> Result<(&mut [u8], &mut Self), ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, Infallible>>where
Self: IntoBytes + KnownLayout,
fn mut_from_suffix(
source: &mut [u8],
) -> Result<(&mut [u8], &mut Self), ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, Infallible>>where
Self: IntoBytes + KnownLayout,
Source§fn mut_from_prefix_with_elems(
source: &mut [u8],
count: usize,
) -> Result<(&mut Self, &mut [u8]), ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, Infallible>>
fn mut_from_prefix_with_elems( source: &mut [u8], count: usize, ) -> Result<(&mut Self, &mut [u8]), ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, Infallible>>
Source§fn mut_from_suffix_with_elems(
source: &mut [u8],
count: usize,
) -> Result<(&mut [u8], &mut Self), ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, Infallible>>
fn mut_from_suffix_with_elems( source: &mut [u8], count: usize, ) -> Result<(&mut [u8], &mut Self), ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, Infallible>>
Source§impl KnownLayout for RootItem
impl KnownLayout for RootItem
Source§type PointerMetadata = <[u64; 8] as KnownLayout>::PointerMetadata
type PointerMetadata = <[u64; 8] as KnownLayout>::PointerMetadata
Self
. Read moreSource§impl TryFromBytes for RootItemwhere
InodeItem: TryFromBytes,
U64: TryFromBytes,
U32: TryFromBytes,
Key: TryFromBytes,
u8: TryFromBytes,
UuidBytes: TryFromBytes,
Time: TryFromBytes,
[u64; 8]: TryFromBytes,
impl TryFromBytes for RootItemwhere
InodeItem: TryFromBytes,
U64: TryFromBytes,
U32: TryFromBytes,
Key: TryFromBytes,
u8: TryFromBytes,
UuidBytes: TryFromBytes,
Time: TryFromBytes,
[u64; 8]: TryFromBytes,
Source§fn try_mut_from_bytes(
bytes: &mut [u8],
) -> Result<&mut Self, ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, ValidityError<&mut [u8], Self>>>where
Self: KnownLayout + IntoBytes,
fn try_mut_from_bytes(
bytes: &mut [u8],
) -> Result<&mut Self, ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, ValidityError<&mut [u8], Self>>>where
Self: KnownLayout + IntoBytes,
Source§fn try_mut_from_prefix(
source: &mut [u8],
) -> Result<(&mut Self, &mut [u8]), ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, ValidityError<&mut [u8], Self>>>where
Self: KnownLayout + IntoBytes,
fn try_mut_from_prefix(
source: &mut [u8],
) -> Result<(&mut Self, &mut [u8]), ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, ValidityError<&mut [u8], Self>>>where
Self: KnownLayout + IntoBytes,
Source§fn try_mut_from_suffix(
source: &mut [u8],
) -> Result<(&mut [u8], &mut Self), ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, ValidityError<&mut [u8], Self>>>where
Self: KnownLayout + IntoBytes,
fn try_mut_from_suffix(
source: &mut [u8],
) -> Result<(&mut [u8], &mut Self), ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, ValidityError<&mut [u8], Self>>>where
Self: KnownLayout + IntoBytes,
Source§fn try_mut_from_bytes_with_elems(
source: &mut [u8],
count: usize,
) -> Result<&mut Self, ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, ValidityError<&mut [u8], Self>>>
fn try_mut_from_bytes_with_elems( source: &mut [u8], count: usize, ) -> Result<&mut Self, ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, ValidityError<&mut [u8], Self>>>
Source§fn try_mut_from_prefix_with_elems(
source: &mut [u8],
count: usize,
) -> Result<(&mut Self, &mut [u8]), ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, ValidityError<&mut [u8], Self>>>
fn try_mut_from_prefix_with_elems( source: &mut [u8], count: usize, ) -> Result<(&mut Self, &mut [u8]), ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, ValidityError<&mut [u8], Self>>>
source
as a &mut Self
with a DST length equal to count
. Read moreSource§fn try_mut_from_suffix_with_elems(
source: &mut [u8],
count: usize,
) -> Result<(&mut [u8], &mut Self), ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, ValidityError<&mut [u8], Self>>>
fn try_mut_from_suffix_with_elems( source: &mut [u8], count: usize, ) -> Result<(&mut [u8], &mut Self), ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, ValidityError<&mut [u8], Self>>>
source
as a &mut Self
with a DST length equal to count
. Read more