pub fn read_node(
image: &[u8],
sb: &Superblock,
chunk_map: &ChunkMap,
logical: u64,
) -> Result<Node, BtrfsError>Expand description
Read the btrfs node at logical address logical: translate it to a physical
offset via chunk_map (falling back to the superblock sys_chunk_array
bootstrap for addresses inside the chunk_root’s own range), slice nodesize
bytes, and parse the header + items/pointers.
§Errors
BtrfsError::Truncatediflogicalcannot be translated to a physical offset, or the resultingnodesize-byte block lies outsideimage.