Skip to main content

Module superblock

Module superblock 

Source
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§

BackupRoot
A single backup root entry.
DevItem
Embedded device information from the superblock.
Superblock
Parsed btrfs superblock.

Enums§

CsumType
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.