pub enum ChunkProfile {
Single,
Dup,
Raid0,
Raid1,
Raid10,
Raid5,
Raid6,
}Expand description
RAID profile derived from a chunk’s chunk_type flags.
RAID1 covers all mirrored profiles (RAID1, RAID1C3, RAID1C4) since
they share the same routing math (every stripe gets the same bytes).
The number of mirrors is given by ChunkMapping::num_stripes.
Variants§
Single
No replication, no striping. One stripe, written/read whole.
Dup
Two copies on the same device (mostly used for metadata on single-device filesystems). Both stripes get the same bytes.
Raid0
Striped across devices, no redundancy. Each row of stripe_len
bytes lands on a single device; consecutive rows round-robin.
Raid1
Mirrored across N devices (num_stripes = 2/3/4 for
RAID1 / RAID1C3 / RAID1C4). Every stripe gets the same bytes.
Raid10
Striped mirrors. num_stripes / sub_stripes data groups, each
mirrored sub_stripes-ways (always 2 in practice).
Raid5
Striped with parity (single parity device). Not yet handled.
Raid6
Striped with double parity. Not yet handled.
Implementations§
Source§impl ChunkProfile
impl ChunkProfile
Sourcepub fn from_chunk_type(chunk_type: u64) -> Self
pub fn from_chunk_type(chunk_type: u64) -> Self
Decode the RAID profile bits of an on-disk chunk_type field.
SINGLE is the absence of any profile bit. The data/metadata/system bits are ignored — only the RAID profile bits matter for routing.
Trait Implementations§
Source§impl Clone for ChunkProfile
impl Clone for ChunkProfile
Source§fn clone(&self) -> ChunkProfile
fn clone(&self) -> ChunkProfile
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more