pub struct JournalTxEnd {
pub tx_id: u64,
_pad: [u8; 4088],
}Expand description
Represents a journal transaction is ended.
This structure is used during transaction commit to mark the end of transaction.
Fields§
§tx_id: u64Transaction id.
_pad: [u8; 4088]Implementations§
Source§impl JournalTxEnd
impl JournalTxEnd
Sourcepub fn from_io(
io: &JournalIO<'_>,
lba: LogicalBlockAddress,
) -> Result<Box<Self>, KernelError>
pub fn from_io( io: &JournalIO<'_>, lba: LogicalBlockAddress, ) -> Result<Box<Self>, KernelError>
Loads a journal TxEnd block from disk at the specified LBA.
§Arguments
io: Interface for reading blocks from disk.lba: Logical block address of the journal transaction block to load.
§Returns
Ok(Box<Self>): The loaded journal transaction block.Err(KernelError): If the block could not be read or parsed.
Sourcepub fn into_block(self: Box<Self>) -> Box<[u8; 4096]>
pub fn into_block(self: Box<Self>) -> Box<[u8; 4096]>
Converts this transaction into a 4096-byte block suitable for writing to disk.
This is typically used during transaction commit.