#[repr(C)]pub struct IndirectBlock {
lbas: [Option<LogicalBlockAddress>; 512],
}Expand description
Represents an indirect block in the filesystem.
An indirect block is used to extend the number of data blocks that an inode can reference. Instead of storing data directly, it contains a list of logical block addresses (LBAs), each pointing to a separate data block on disk.
This structure allows files to grow beyond the direct block limit imposed by the inode structure.
§Usage
Typically used as part of indirect, or double-indirectblock addressing schemes to support large file sizes.
Fields§
§lbas: [Option<LogicalBlockAddress>; 512]Trait Implementations§
Source§impl Default for IndirectBlock
impl Default for IndirectBlock
Source§impl Deref for IndirectBlock
impl Deref for IndirectBlock
Source§impl DerefMut for IndirectBlock
impl DerefMut for IndirectBlock
Source§impl MetaData for IndirectBlock
impl MetaData for IndirectBlock
Source§fn load(
ffs: &FastFileSystemInner,
lba: LogicalBlockAddress,
) -> Result<BlockPointsTo<Self>, KernelError>
fn load( ffs: &FastFileSystemInner, lba: LogicalBlockAddress, ) -> Result<BlockPointsTo<Self>, KernelError>
Loads a metadata structure from disk at the specified logical block
address. Read more
Auto Trait Implementations§
impl Freeze for IndirectBlock
impl RefUnwindSafe for IndirectBlock
impl Send for IndirectBlock
impl Sync for IndirectBlock
impl Unpin for IndirectBlock
impl UnwindSafe for IndirectBlock
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more