pub struct ChunkMapping {
pub logical: u64,
pub length: u64,
pub stripe_len: u64,
pub chunk_type: u64,
pub num_stripes: u16,
pub sub_stripes: u16,
pub stripes: Vec<Stripe>,
}Expand description
A chunk mapping: maps a range of logical addresses to physical device locations.
Fields§
§logical: u64Starting logical byte address of this chunk.
length: u64Length of this chunk in bytes.
stripe_len: u64Stripe length for striped profiles (RAID0/10/5/6).
chunk_type: u64Chunk type flags (DATA/METADATA/SYSTEM + RAID profile).
num_stripes: u16Number of stripes (device copies/segments).
sub_stripes: u16Sub-stripes for RAID10.
stripes: Vec<Stripe>Physical device locations for each stripe.
Implementations§
Source§impl ChunkMapping
impl ChunkMapping
Sourcepub fn profile(&self) -> ChunkProfile
pub fn profile(&self) -> ChunkProfile
Decode the chunk’s RAID profile from its chunk_type field.
Trait Implementations§
Source§impl Clone for ChunkMapping
impl Clone for ChunkMapping
Source§fn clone(&self) -> ChunkMapping
fn clone(&self) -> ChunkMapping
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ChunkMapping
impl RefUnwindSafe for ChunkMapping
impl Send for ChunkMapping
impl Sync for ChunkMapping
impl Unpin for ChunkMapping
impl UnsafeUnpin for ChunkMapping
impl UnwindSafe for ChunkMapping
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