pub struct ChunkItem {
pub length: u64,
pub owner: u64,
pub stripe_len: u64,
pub chunk_type: BlockGroupFlags,
pub io_align: u32,
pub io_width: u32,
pub sector_size: u32,
pub num_stripes: u16,
pub sub_stripes: u16,
pub stripes: Vec<ChunkStripe>,
}Expand description
Chunk item mapping logical addresses to physical device locations.
Key: (FIRST_CHUNK_TREE, CHUNK_ITEM, logical_offset). Each chunk maps a
contiguous range of logical addresses to one or more device stripes.
Fields§
§length: u64Length of this chunk in bytes.
owner: u64Owner of this chunk (always BTRFS_FIRST_CHUNK_TREE_OBJECTID).
stripe_len: u64Stripe length for striped profiles.
chunk_type: BlockGroupFlagsType and RAID profile flags.
io_align: u32I/O alignment requirement.
io_width: u32I/O width requirement.
sector_size: u32Sector size of the underlying devices.
num_stripes: u16Number of stripes (device copies) for this chunk.
sub_stripes: u16Number of sub-stripes (for RAID10).
stripes: Vec<ChunkStripe>Physical device locations for each stripe.
Implementations§
Source§impl ChunkItem
impl ChunkItem
Sourcepub fn to_mapping(&self, logical: u64) -> ChunkMapping
pub fn to_mapping(&self, logical: u64) -> ChunkMapping
Convert to a ChunkMapping for use with chunk_item_bytes and
ChunkTreeCache.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ChunkItem
impl RefUnwindSafe for ChunkItem
impl Send for ChunkItem
impl Sync for ChunkItem
impl Unpin for ChunkItem
impl UnsafeUnpin for ChunkItem
impl UnwindSafe for ChunkItem
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