1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
use {
byteorder::LE,
static_assertions::const_assert_eq,
zerocopy::{AsBytes, FromBytes, Unaligned, U64},
};
#[derive(Copy, Clone, Debug, AsBytes, FromBytes, Unaligned)]
#[repr(C, packed)]
pub struct RootBackup {
pub tree_root: U64<LE>,
pub tree_root_gen: U64<LE>,
pub chunk_root: U64<LE>,
pub chunk_root_gen: U64<LE>,
pub extent_root: U64<LE>,
pub extent_root_gen: U64<LE>,
pub fs_root: U64<LE>,
pub fs_root_gen: U64<LE>,
pub dev_root: U64<LE>,
pub dev_root_gen: U64<LE>,
pub csum_root: U64<LE>,
pub csum_root_gen: U64<LE>,
pub total_bytes: U64<LE>,
pub bytes_used: U64<LE>,
pub num_devices: U64<LE>,
pub _unused_u64s: [U64<LE>; 4],
pub tree_root_level: u8,
pub chunk_root_level: u8,
pub extent_root_level: u8,
pub fs_root_level: u8,
pub dev_root_level: u8,
pub csum_root_level: u8,
pub _unused_u8s: [u8; 10],
}
const_assert_eq!(core::mem::size_of::<RootBackup>(), 168);