pub struct IndirectCache { /* private fields */ }Expand description
Single-entry cache for the most-recently-read indirect block. Sequential reads through any single tier (single, double, or triple indirect) hit this 100%. Cross-tier transitions cause one cache miss each, which is fine — those happen at most twice per file (entering double, entering triple).
For higher-tier reads where two off-inode blocks must be touched (double
indirect needs the outer + inner block; triple needs three), only the
last-touched block stays cached. That trades read-coalescing within a
single inner block (good) for re-reading the outer block on every inner-
block transition (acceptable — block_size/4 reads happen between such
transitions, so the cost is amortized).
Implementations§
Source§impl IndirectCache
impl IndirectCache
Trait Implementations§
Auto Trait Implementations§
impl Freeze for IndirectCache
impl RefUnwindSafe for IndirectCache
impl Send for IndirectCache
impl Sync for IndirectCache
impl Unpin for IndirectCache
impl UnsafeUnpin for IndirectCache
impl UnwindSafe for IndirectCache
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