Skip to main content

inline_ref_size

Function inline_ref_size 

Source
pub fn inline_ref_size(type_byte: u8) -> Option<usize>
Expand description

On-disk size in bytes of an inline backref record (including its 1-byte type tag) for a given inline ref type byte.

Returns None if type_byte is not a recognized inline ref type.

  • TREE_BLOCK_REF/EXTENT_OWNER_REF: 1 (tag) + 8 (root) = 9
  • SHARED_BLOCK_REF: 1 (tag) + 8 (parent) = 9
  • EXTENT_DATA_REF: 1 (tag) + 28 (btrfs_extent_data_ref) = 29
  • SHARED_DATA_REF: 1 (tag) + 8 (parent) + 4 (count) = 13