btrfs_no_std/constants.rs
1/// The physical address of the primary superblock.
2pub const PRIMARY_SUPERBLOCK_ADDR: u64 = 0x10000;
3
4/// The physical addresses of superblocks.
5pub const SUPERBLOCK_ADDRS: [u64; 3] = [PRIMARY_SUPERBLOCK_ADDR, 0x4000000, 0x4000000000];
6
7pub const MAGIC: u64 = 0x4D5F53665248425F;
8
9/// Corresponds to `BTRFS_CSUM_SIZE`.
10pub const CSUM_SIZE: usize = 32;
11
12/// Corresponds to `BTRFS_FSID_SIZE`.
13pub const FSID_SIZE: usize = 16;
14
15/// Corresponds to `BTRFS_LABEL_SIZE`.
16pub const LABEL_SIZE: usize = 256;
17
18/// Corresponds to `BTRFS_UUID_SIZE`.
19pub const UUID_SIZE: usize = 16;
20
21/// Corresponds to `BTRFS_SYSTEM_CHUNK_ARRAY_SIZE`.
22pub const MAX_SYSTEM_CHUNK_ARRAY_SIZE: usize = 2048;
23
24/// Corresponds to `BTRFS_NUM_BACKUP_ROOTS`.
25pub const NUM_BACKUP_ROOTS: usize = 4;