pub enum ExtentMutation {
WriteRoot {
bytes: Vec<u8>,
},
WriteTreeBlock {
block: u64,
bytes: Vec<u8>,
},
AllocLeafBlock {
bytes: Vec<u8>,
},
FreeLeafBlock {
block: u64,
},
FreePhysicalRun {
start: u64,
len: u32,
},
}Expand description
A primitive change the extent-write path wants to make to the tree. The caller (E10 or a test) converts this into real I/O under a transaction.
Variants§
WriteRoot
Overwrite the inline root (60 bytes of i_block) with these bytes.
WriteTreeBlock
Rewrite an existing external extent node. The filesystem patches its checksum and journals this together with the inode and bitmap updates.
AllocLeafBlock
Allocate a fresh leaf block and write these bytes to it. Returned for future multi-level operations; not produced by the current plan fns.
FreeLeafBlock
Free a previously-used leaf/index block back to the bitmap.
FreePhysicalRun
Free a contiguous physical-block run back to the bitmap (from a
dropped leaf extent). start is the first physical block, len is
the count.
Trait Implementations§
Source§impl Clone for ExtentMutation
impl Clone for ExtentMutation
Source§impl Debug for ExtentMutation
impl Debug for ExtentMutation
impl Eq for ExtentMutation
Source§impl PartialEq for ExtentMutation
impl PartialEq for ExtentMutation
impl StructuralPartialEq for ExtentMutation
Auto Trait Implementations§
impl Freeze for ExtentMutation
impl RefUnwindSafe for ExtentMutation
impl Send for ExtentMutation
impl Sync for ExtentMutation
impl Unpin for ExtentMutation
impl UnsafeUnpin for ExtentMutation
impl UnwindSafe for ExtentMutation
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