Skip to main content

Module chunk

Module chunk 

Source
Expand description

§Per-device physical allocation data from the chunk tree

Walks the chunk tree to determine how many bytes each device has allocated, broken down by block-group profile flags. This is the data source for the per-device breakdown in btrfs filesystem usage.

Also exposes the full per-stripe chunk list used by inspect-internal list-chunks, including the bytes-used figure from the extent tree.

Requires CAP_SYS_ADMIN.

Structs§

ChunkEntry
One physical chunk stripe as seen in the chunk tree, with usage data from the extent tree.
DeviceAllocation
Physical allocation of one block-group profile on one device, as read from the chunk tree.

Functions§

chunk_list
Walk the chunk tree and return one ChunkEntry per stripe, including bytes-used from the extent tree.
device_chunk_allocations
Walk the chunk tree of the filesystem referred to by fd and return the physical allocation of each block-group profile on each device.