Expand description
§Chunk: logical-to-physical address mapping for btrfs filesystems
Btrfs maps logical addresses to physical device offsets through chunk items stored in the chunk tree. The superblock embeds a small subset of the chunk tree (the system chunk array) to bootstrap access to the full chunk tree.
This module provides a ChunkTreeCache that resolves logical addresses to
physical offsets, seeded from the sys_chunk_array and then populated from
the full chunk tree.
Structs§
- Chunk
Mapping - A chunk mapping: maps a range of logical addresses to physical device locations.
- Chunk
Tree Cache - Cache of chunk tree mappings for resolving logical to physical addresses.
- Stripe
- A single stripe in a chunk mapping.
Functions§
- parse_
chunk_ item - Parse a chunk item (btrfs_chunk + stripes) from a raw byte buffer.
- seed_
from_ sys_ chunk_ array - Seed a
ChunkTreeCachefrom the superblock’s sys_chunk_array.