Expand description
§Shared helpers for on-disk structures
Little-endian writer functions for placing typed values into raw byte buffers at known offsets, and a raw CRC32C matching the kernel’s format.
Functions§
- btrfs_
csum_ data - Standard CRC32C matching the kernel’s
hash_crc32c()/ btrfs on-disk checksum format. - btrfs_
name_ hash - Btrfs name hash for
DIR_ITEMandDIR_INDEXkey offsets. - csum_
tree_ block - Recompute the checksum of a tree block and write it into the header.
- get_
uuid - Read a UUID (16 bytes) from a
Buf, advancing the cursor. - raw_
crc32c - Raw CRC32C matching the kernel’s
crc32c_le()function. - write_
disk_ key - Write a
DiskKey(17 bytes) intobufat byte offsetoff. - write_
le_ u16 - Write a little-endian u16 into
bufat byte offsetoff. - write_
le_ u32 - Write a little-endian u32 into
bufat byte offsetoff. - write_
le_ u64 - Write a little-endian u64 into
bufat byte offsetoff. - write_
uuid - Write a UUID (16 bytes) into
bufat byte offsetoff.