pub struct JournalHeader {
pub endian: JournalEndian,
pub magic: u32,
pub start: u64,
pub end: u64,
pub size: u64,
pub blhdr_size: u32,
pub checksum: u32,
pub jhdr_size: u32,
pub sequence_num: u32,
}Expand description
The journal header at JournalInfoBlock.offset (struct journal_header).
All multi-byte fields use endian.
Fields§
§endian: JournalEndian§magic: u32§start: u64Byte offset (relative to the journal device base = jib.offset) of the
first live transaction.
end: u64Byte offset of the first free byte. start == end means empty/clean.
size: u64Journal size in bytes (matches JournalInfoBlock.size).
blhdr_size: u32Size of each block_list_header region (data follows it).
checksum: u32§jhdr_size: u32Journal header block size, and the unit binfo.bnum is multiplied by.
sequence_num: u32Implementations§
Source§impl JournalHeader
impl JournalHeader
Sourcepub fn parse(data: &[u8]) -> Result<Self, JournalError>
pub fn parse(data: &[u8]) -> Result<Self, JournalError>
Parse the journal header, auto-detecting byte order from endian.
Trait Implementations§
Source§impl Clone for JournalHeader
impl Clone for JournalHeader
Auto Trait Implementations§
impl Freeze for JournalHeader
impl RefUnwindSafe for JournalHeader
impl Send for JournalHeader
impl Sync for JournalHeader
impl Unpin for JournalHeader
impl UnsafeUnpin for JournalHeader
impl UnwindSafe for JournalHeader
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more