Expand description
§Superblock: reading and parsing the btrfs superblock from a block device
The superblock is a 4096-byte structure stored at a fixed offset on disk (primary at 64 KiB, with mirrors at 64 MiB and 256 GiB). It contains the root pointers and metadata needed to bootstrap access to the rest of the filesystem.
Structs§
- Backup
Root - A single backup root entry.
- DevItem
- Embedded device information from the superblock.
- Superblock
- Parsed btrfs superblock.
Enums§
- Csum
Type - Checksum algorithm used by the filesystem.
Constants§
- SUPER_
MIRROR_ MAX - Maximum number of superblock mirrors (3: primary + 2 copies). From kernel-shared/disk-io.h: BTRFS_SUPER_MIRROR_MAX
Functions§
- print_
superblock - Print the superblock in the same format as
btrfs inspect-internal dump-super. - read_
superblock - Read and parse a btrfs superblock from a reader at the given mirror index (0, 1, or 2).
- super_
mirror_ offset - Compute the byte offset of the superblock mirror at
index.