Skip to main content

Module reader

Module reader 

Source
Expand description

§Block device reader with logical-to-physical address resolution

Provides BlockReader which reads btrfs tree blocks by logical address, resolving them through the chunk tree cache. Also provides filesystem_open which bootstraps a complete BlockReader from a raw block device or image.

Structs§

BlockReader
A block reader that resolves logical addresses through a chunk cache.
OpenFilesystem
Result of opening a btrfs filesystem from a block device or image.
TreeStats
Statistics collected by walking all blocks of a single B-tree.

Enums§

Traversal
Tree traversal order.

Functions§

block_visit
Read a single block and call visitor (and optionally walk children with follow).
filesystem_open
Open a btrfs filesystem by bootstrapping from the superblock.
filesystem_open_mirror
Open a btrfs filesystem using a specific superblock mirror (0, 1, or 2).
filesystem_open_multi
Open a multi-device btrfs filesystem from a map of devid -> handle.
filesystem_open_with_cache
Open a btrfs filesystem using a pre-built chunk cache.
read_chunk_tree
Recursively read the chunk tree to populate the chunk cache.
read_root_tree
Read the root tree to collect all tree root pointers.
tree_stats_collect
Walk root_logical collecting TreeStats.
tree_walk
Walk a tree starting at root_logical, calling visitor for each block.
tree_walk_mut
Walk a tree (DFS), allowing the visitor to modify each block in place.
tree_walk_tolerant
Walk a tree, continuing past individual block read errors.