Skip to main content

chunk_list

Function chunk_list 

Source
pub fn chunk_list(fd: BorrowedFd<'_>) -> Result<Vec<ChunkEntry>>
Expand description

Walk the chunk tree and return one ChunkEntry per stripe, including bytes-used from the extent tree.

The returned list is in chunk-tree order (ascending logical offset); call sites are responsible for any further sorting. For each logical chunk the used field is populated by a single extent-tree lookup; if that lookup fails the field is set to 0 rather than propagating an error.

Requires CAP_SYS_ADMIN.