<资料收集>btrfs super block

本文详细解释了Btrfs超级块的结构,包括其主要组成部分及其作用。
 1 /*
 2  * the super block basically lists the main trees of the FS
 3  * it currently lacks any block count etc etc
 4  */
 5 struct btrfs_super_block {
 6     u8 csum[BTRFS_CSUM_SIZE];                                          
 7     /* the first 4 fields must match struct btrfs_header */
 8     u8 fsid[BTRFS_FSID_SIZE];    /* FS specific uuid */                
 9     __le64 bytenr; /* this block number */
10     __le64 flags;
11 
12     /* allowed to be different from the btrfs_header from here own down */
13     __le64 magic;
14     __le64 generation;
15     __le64 root;
16     __le64 chunk_root;
17     __le64 log_root;
18 
19     /* this will help find the new super based on the log root */
20     __le64 log_root_transid;
21     __le64 total_bytes;
22     __le64 bytes_used;
23     __le64 root_dir_objectid;
24     __le64 num_devices;
25     __le32 sectorsize;
26     __le32 nodesize;
27     __le32 leafsize;
28     __le32 stripesize;
29     __le32 sys_chunk_array_size;
30     __le64 chunk_root_generation;
31     __le64 compat_flags;
32     __le64 compat_ro_flags;
33     __le64 incompat_flags;
34     __le16 csum_type;
35     u8 root_level;
36     u8 chunk_root_level;
37     u8 log_root_level;
38     struct btrfs_dev_item dev_item;
39 
40     char label[BTRFS_LABEL_SIZE];
41 
42     __le64 cache_generation;
43     __le64 uuid_tree_generation;
44 
45     /* future expansion */
46     __le64 reserved[30];
47     u8 sys_chunk_array[BTRFS_SYSTEM_CHUNK_ARRAY_SIZE];
48     struct btrfs_root_backup super_roots[BTRFS_NUM_BACKUP_ROOTS];
49 } __attribute__ ((__packed__));

 

转载于:https://www.cnblogs.com/shanon/p/4569057.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值