blob: 677a5805182bbd696a7c974e55f95e0a63360672 [file] [log] [blame]
Christopher Ferris106b3a82016-08-24 12:15:38 -07001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef _BTRFS_CTREE_H_
20#define _BTRFS_CTREE_H_
21#define BTRFS_ROOT_TREE_OBJECTID 1ULL
22#define BTRFS_EXTENT_TREE_OBJECTID 2ULL
Christopher Ferris106b3a82016-08-24 12:15:38 -070023#define BTRFS_CHUNK_TREE_OBJECTID 3ULL
24#define BTRFS_DEV_TREE_OBJECTID 4ULL
25#define BTRFS_FS_TREE_OBJECTID 5ULL
26#define BTRFS_ROOT_TREE_DIR_OBJECTID 6ULL
Christopher Ferris106b3a82016-08-24 12:15:38 -070027#define BTRFS_CSUM_TREE_OBJECTID 7ULL
28#define BTRFS_QUOTA_TREE_OBJECTID 8ULL
29#define BTRFS_UUID_TREE_OBJECTID 9ULL
30#define BTRFS_FREE_SPACE_TREE_OBJECTID 10ULL
Christopher Ferris106b3a82016-08-24 12:15:38 -070031#define BTRFS_DEV_STATS_OBJECTID 0ULL
32#define BTRFS_BALANCE_OBJECTID - 4ULL
33#define BTRFS_ORPHAN_OBJECTID - 5ULL
34#define BTRFS_TREE_LOG_OBJECTID - 6ULL
Christopher Ferris106b3a82016-08-24 12:15:38 -070035#define BTRFS_TREE_LOG_FIXUP_OBJECTID - 7ULL
36#define BTRFS_TREE_RELOC_OBJECTID - 8ULL
37#define BTRFS_DATA_RELOC_TREE_OBJECTID - 9ULL
38#define BTRFS_EXTENT_CSUM_OBJECTID - 10ULL
Christopher Ferris106b3a82016-08-24 12:15:38 -070039#define BTRFS_FREE_SPACE_OBJECTID - 11ULL
40#define BTRFS_FREE_INO_OBJECTID - 12ULL
41#define BTRFS_MULTIPLE_OBJECTIDS - 255ULL
42#define BTRFS_FIRST_FREE_OBJECTID 256ULL
Christopher Ferris106b3a82016-08-24 12:15:38 -070043#define BTRFS_LAST_FREE_OBJECTID - 256ULL
44#define BTRFS_FIRST_CHUNK_TREE_OBJECTID 256ULL
45#define BTRFS_DEV_ITEMS_OBJECTID 1ULL
46#define BTRFS_BTREE_INODE_OBJECTID 1
Christopher Ferris106b3a82016-08-24 12:15:38 -070047#define BTRFS_EMPTY_SUBVOL_DIR_OBJECTID 2
48#define BTRFS_DEV_REPLACE_DEVID 0ULL
49#define BTRFS_INODE_ITEM_KEY 1
50#define BTRFS_INODE_REF_KEY 12
Christopher Ferris106b3a82016-08-24 12:15:38 -070051#define BTRFS_INODE_EXTREF_KEY 13
52#define BTRFS_XATTR_ITEM_KEY 24
53#define BTRFS_ORPHAN_ITEM_KEY 48
54#define BTRFS_DIR_LOG_ITEM_KEY 60
Christopher Ferris106b3a82016-08-24 12:15:38 -070055#define BTRFS_DIR_LOG_INDEX_KEY 72
56#define BTRFS_DIR_ITEM_KEY 84
57#define BTRFS_DIR_INDEX_KEY 96
58#define BTRFS_EXTENT_DATA_KEY 108
Christopher Ferris106b3a82016-08-24 12:15:38 -070059#define BTRFS_EXTENT_CSUM_KEY 128
60#define BTRFS_ROOT_ITEM_KEY 132
61#define BTRFS_ROOT_BACKREF_KEY 144
62#define BTRFS_ROOT_REF_KEY 156
Christopher Ferris106b3a82016-08-24 12:15:38 -070063#define BTRFS_EXTENT_ITEM_KEY 168
64#define BTRFS_METADATA_ITEM_KEY 169
65#define BTRFS_TREE_BLOCK_REF_KEY 176
66#define BTRFS_EXTENT_DATA_REF_KEY 178
Christopher Ferris106b3a82016-08-24 12:15:38 -070067#define BTRFS_EXTENT_REF_V0_KEY 180
68#define BTRFS_SHARED_BLOCK_REF_KEY 182
69#define BTRFS_SHARED_DATA_REF_KEY 184
70#define BTRFS_BLOCK_GROUP_ITEM_KEY 192
Christopher Ferris106b3a82016-08-24 12:15:38 -070071#define BTRFS_FREE_SPACE_INFO_KEY 198
72#define BTRFS_FREE_SPACE_EXTENT_KEY 199
73#define BTRFS_FREE_SPACE_BITMAP_KEY 200
74#define BTRFS_DEV_EXTENT_KEY 204
Christopher Ferris106b3a82016-08-24 12:15:38 -070075#define BTRFS_DEV_ITEM_KEY 216
76#define BTRFS_CHUNK_ITEM_KEY 228
77#define BTRFS_QGROUP_STATUS_KEY 240
78#define BTRFS_QGROUP_INFO_KEY 242
Christopher Ferris106b3a82016-08-24 12:15:38 -070079#define BTRFS_QGROUP_LIMIT_KEY 244
80#define BTRFS_QGROUP_RELATION_KEY 246
81#define BTRFS_BALANCE_ITEM_KEY 248
82#define BTRFS_TEMPORARY_ITEM_KEY 248
Christopher Ferris106b3a82016-08-24 12:15:38 -070083#define BTRFS_DEV_STATS_KEY 249
84#define BTRFS_PERSISTENT_ITEM_KEY 249
85#define BTRFS_DEV_REPLACE_KEY 250
86#if BTRFS_UUID_SIZE != 16
Christopher Ferris106b3a82016-08-24 12:15:38 -070087#error "UUID items require BTRFS_UUID_SIZE == 16!"
88#endif
89#define BTRFS_UUID_KEY_SUBVOL 251
90#define BTRFS_UUID_KEY_RECEIVED_SUBVOL 252
Christopher Ferris106b3a82016-08-24 12:15:38 -070091#define BTRFS_STRING_ITEM_KEY 253
92#define BTRFS_CSUM_SIZE 32
93#define BTRFS_CSUM_TYPE_CRC32 0
94#define BTRFS_FT_UNKNOWN 0
Christopher Ferris106b3a82016-08-24 12:15:38 -070095#define BTRFS_FT_REG_FILE 1
96#define BTRFS_FT_DIR 2
97#define BTRFS_FT_CHRDEV 3
98#define BTRFS_FT_BLKDEV 4
Christopher Ferris106b3a82016-08-24 12:15:38 -070099#define BTRFS_FT_FIFO 5
100#define BTRFS_FT_SOCK 6
101#define BTRFS_FT_SYMLINK 7
102#define BTRFS_FT_XATTR 8
Christopher Ferris106b3a82016-08-24 12:15:38 -0700103#define BTRFS_FT_MAX 9
104struct btrfs_disk_key {
105 __le64 objectid;
106 __u8 type;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700107 __le64 offset;
108} __attribute__((__packed__));
109struct btrfs_key {
110 __u64 objectid;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700111 __u8 type;
112 __u64 offset;
113} __attribute__((__packed__));
114struct btrfs_dev_item {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700115 __le64 devid;
116 __le64 total_bytes;
117 __le64 bytes_used;
118 __le32 io_align;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700119 __le32 io_width;
120 __le32 sector_size;
121 __le64 type;
122 __le64 generation;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700123 __le64 start_offset;
124 __le32 dev_group;
125 __u8 seek_speed;
126 __u8 bandwidth;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700127 __u8 uuid[BTRFS_UUID_SIZE];
128 __u8 fsid[BTRFS_UUID_SIZE];
129} __attribute__((__packed__));
130struct btrfs_stripe {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700131 __le64 devid;
132 __le64 offset;
133 __u8 dev_uuid[BTRFS_UUID_SIZE];
134} __attribute__((__packed__));
Christopher Ferris106b3a82016-08-24 12:15:38 -0700135struct btrfs_chunk {
136 __le64 length;
137 __le64 owner;
138 __le64 stripe_len;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700139 __le64 type;
140 __le32 io_align;
141 __le32 io_width;
142 __le32 sector_size;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700143 __le16 num_stripes;
144 __le16 sub_stripes;
145 struct btrfs_stripe stripe;
146} __attribute__((__packed__));
Christopher Ferris106b3a82016-08-24 12:15:38 -0700147#define BTRFS_FREE_SPACE_EXTENT 1
148#define BTRFS_FREE_SPACE_BITMAP 2
149struct btrfs_free_space_entry {
150 __le64 offset;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700151 __le64 bytes;
152 __u8 type;
153} __attribute__((__packed__));
154struct btrfs_free_space_header {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700155 struct btrfs_disk_key location;
156 __le64 generation;
157 __le64 num_entries;
158 __le64 num_bitmaps;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700159} __attribute__((__packed__));
160#define BTRFS_HEADER_FLAG_WRITTEN (1ULL << 0)
161#define BTRFS_HEADER_FLAG_RELOC (1ULL << 1)
162#define BTRFS_SUPER_FLAG_ERROR (1ULL << 2)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700163#define BTRFS_SUPER_FLAG_SEEDING (1ULL << 32)
164#define BTRFS_SUPER_FLAG_METADUMP (1ULL << 33)
165struct btrfs_extent_item {
166 __le64 refs;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700167 __le64 generation;
168 __le64 flags;
169} __attribute__((__packed__));
170struct btrfs_extent_item_v0 {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700171 __le32 refs;
172} __attribute__((__packed__));
173#define BTRFS_EXTENT_FLAG_DATA (1ULL << 0)
174#define BTRFS_EXTENT_FLAG_TREE_BLOCK (1ULL << 1)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700175#define BTRFS_BLOCK_FLAG_FULL_BACKREF (1ULL << 8)
176#define BTRFS_EXTENT_FLAG_SUPER (1ULL << 48)
177struct btrfs_tree_block_info {
178 struct btrfs_disk_key key;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700179 __u8 level;
180} __attribute__((__packed__));
181struct btrfs_extent_data_ref {
182 __le64 root;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700183 __le64 objectid;
184 __le64 offset;
185 __le32 count;
186} __attribute__((__packed__));
Christopher Ferris106b3a82016-08-24 12:15:38 -0700187struct btrfs_shared_data_ref {
188 __le32 count;
189} __attribute__((__packed__));
190struct btrfs_extent_inline_ref {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700191 __u8 type;
192 __le64 offset;
193} __attribute__((__packed__));
194struct btrfs_extent_ref_v0 {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700195 __le64 root;
196 __le64 generation;
197 __le64 objectid;
198 __le32 count;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700199} __attribute__((__packed__));
200struct btrfs_dev_extent {
201 __le64 chunk_tree;
202 __le64 chunk_objectid;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700203 __le64 chunk_offset;
204 __le64 length;
205 __u8 chunk_tree_uuid[BTRFS_UUID_SIZE];
206} __attribute__((__packed__));
Christopher Ferris106b3a82016-08-24 12:15:38 -0700207struct btrfs_inode_ref {
208 __le64 index;
209 __le16 name_len;
210} __attribute__((__packed__));
Christopher Ferris106b3a82016-08-24 12:15:38 -0700211struct btrfs_inode_extref {
212 __le64 parent_objectid;
213 __le64 index;
214 __le16 name_len;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700215 __u8 name[0];
216} __attribute__((__packed__));
217struct btrfs_timespec {
218 __le64 sec;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700219 __le32 nsec;
220} __attribute__((__packed__));
221struct btrfs_inode_item {
222 __le64 generation;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700223 __le64 transid;
224 __le64 size;
225 __le64 nbytes;
226 __le64 block_group;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700227 __le32 nlink;
228 __le32 uid;
229 __le32 gid;
230 __le32 mode;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700231 __le64 rdev;
232 __le64 flags;
233 __le64 sequence;
234 __le64 reserved[4];
Christopher Ferris106b3a82016-08-24 12:15:38 -0700235 struct btrfs_timespec atime;
236 struct btrfs_timespec ctime;
237 struct btrfs_timespec mtime;
238 struct btrfs_timespec otime;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700239} __attribute__((__packed__));
240struct btrfs_dir_log_item {
241 __le64 end;
242} __attribute__((__packed__));
Christopher Ferris106b3a82016-08-24 12:15:38 -0700243struct btrfs_dir_item {
244 struct btrfs_disk_key location;
245 __le64 transid;
246 __le16 data_len;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700247 __le16 name_len;
248 __u8 type;
249} __attribute__((__packed__));
250#define BTRFS_ROOT_SUBVOL_RDONLY (1ULL << 0)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700251#define BTRFS_ROOT_SUBVOL_DEAD (1ULL << 48)
252struct btrfs_root_item {
253 struct btrfs_inode_item inode;
254 __le64 generation;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700255 __le64 root_dirid;
256 __le64 bytenr;
257 __le64 byte_limit;
258 __le64 bytes_used;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700259 __le64 last_snapshot;
260 __le64 flags;
261 __le32 refs;
262 struct btrfs_disk_key drop_progress;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700263 __u8 drop_level;
264 __u8 level;
265 __le64 generation_v2;
266 __u8 uuid[BTRFS_UUID_SIZE];
Christopher Ferris106b3a82016-08-24 12:15:38 -0700267 __u8 parent_uuid[BTRFS_UUID_SIZE];
268 __u8 received_uuid[BTRFS_UUID_SIZE];
269 __le64 ctransid;
270 __le64 otransid;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700271 __le64 stransid;
272 __le64 rtransid;
273 struct btrfs_timespec ctime;
274 struct btrfs_timespec otime;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700275 struct btrfs_timespec stime;
276 struct btrfs_timespec rtime;
277 __le64 reserved[8];
278} __attribute__((__packed__));
Christopher Ferris106b3a82016-08-24 12:15:38 -0700279struct btrfs_root_ref {
280 __le64 dirid;
281 __le64 sequence;
282 __le16 name_len;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700283} __attribute__((__packed__));
284struct btrfs_disk_balance_args {
285 __le64 profiles;
286 union {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700287 __le64 usage;
288 struct {
289 __le32 usage_min;
290 __le32 usage_max;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700291 };
292 };
293 __le64 devid;
294 __le64 pstart;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700295 __le64 pend;
296 __le64 vstart;
297 __le64 vend;
298 __le64 target;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700299 __le64 flags;
300 union {
301 __le64 limit;
302 struct {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700303 __le32 limit_min;
304 __le32 limit_max;
305 };
306 };
Christopher Ferris106b3a82016-08-24 12:15:38 -0700307 __le32 stripes_min;
308 __le32 stripes_max;
309 __le64 unused[6];
310} __attribute__((__packed__));
Christopher Ferris106b3a82016-08-24 12:15:38 -0700311struct btrfs_balance_item {
312 __le64 flags;
313 struct btrfs_disk_balance_args data;
314 struct btrfs_disk_balance_args meta;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700315 struct btrfs_disk_balance_args sys;
316 __le64 unused[4];
317} __attribute__((__packed__));
318#define BTRFS_FILE_EXTENT_INLINE 0
Christopher Ferris106b3a82016-08-24 12:15:38 -0700319#define BTRFS_FILE_EXTENT_REG 1
320#define BTRFS_FILE_EXTENT_PREALLOC 2
321struct btrfs_file_extent_item {
322 __le64 generation;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700323 __le64 ram_bytes;
324 __u8 compression;
325 __u8 encryption;
326 __le16 other_encoding;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700327 __u8 type;
328 __le64 disk_bytenr;
329 __le64 disk_num_bytes;
330 __le64 offset;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700331 __le64 num_bytes;
332} __attribute__((__packed__));
333struct btrfs_csum_item {
334 __u8 csum;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700335} __attribute__((__packed__));
336struct btrfs_dev_stats_item {
337 __le64 values[BTRFS_DEV_STAT_VALUES_MAX];
338} __attribute__((__packed__));
Christopher Ferris106b3a82016-08-24 12:15:38 -0700339#define BTRFS_DEV_REPLACE_ITEM_CONT_READING_FROM_SRCDEV_MODE_ALWAYS 0
340#define BTRFS_DEV_REPLACE_ITEM_CONT_READING_FROM_SRCDEV_MODE_AVOID 1
341#define BTRFS_DEV_REPLACE_ITEM_STATE_NEVER_STARTED 0
342#define BTRFS_DEV_REPLACE_ITEM_STATE_STARTED 1
Christopher Ferris106b3a82016-08-24 12:15:38 -0700343#define BTRFS_DEV_REPLACE_ITEM_STATE_SUSPENDED 2
344#define BTRFS_DEV_REPLACE_ITEM_STATE_FINISHED 3
345#define BTRFS_DEV_REPLACE_ITEM_STATE_CANCELED 4
346struct btrfs_dev_replace_item {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700347 __le64 src_devid;
348 __le64 cursor_left;
349 __le64 cursor_right;
350 __le64 cont_reading_from_srcdev_mode;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700351 __le64 replace_state;
352 __le64 time_started;
353 __le64 time_stopped;
354 __le64 num_write_errors;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700355 __le64 num_uncorrectable_read_errors;
356} __attribute__((__packed__));
357#define BTRFS_BLOCK_GROUP_DATA (1ULL << 0)
358#define BTRFS_BLOCK_GROUP_SYSTEM (1ULL << 1)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700359#define BTRFS_BLOCK_GROUP_METADATA (1ULL << 2)
360#define BTRFS_BLOCK_GROUP_RAID0 (1ULL << 3)
361#define BTRFS_BLOCK_GROUP_RAID1 (1ULL << 4)
362#define BTRFS_BLOCK_GROUP_DUP (1ULL << 5)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700363#define BTRFS_BLOCK_GROUP_RAID10 (1ULL << 6)
364#define BTRFS_BLOCK_GROUP_RAID5 (1ULL << 7)
365#define BTRFS_BLOCK_GROUP_RAID6 (1ULL << 8)
366#define BTRFS_BLOCK_GROUP_RESERVED (BTRFS_AVAIL_ALLOC_BIT_SINGLE | BTRFS_SPACE_INFO_GLOBAL_RSV)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700367enum btrfs_raid_types {
368 BTRFS_RAID_RAID10,
369 BTRFS_RAID_RAID1,
370 BTRFS_RAID_DUP,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700371 BTRFS_RAID_RAID0,
372 BTRFS_RAID_SINGLE,
373 BTRFS_RAID_RAID5,
374 BTRFS_RAID_RAID6,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700375 BTRFS_NR_RAID_TYPES
376};
377#define BTRFS_BLOCK_GROUP_TYPE_MASK (BTRFS_BLOCK_GROUP_DATA | BTRFS_BLOCK_GROUP_SYSTEM | BTRFS_BLOCK_GROUP_METADATA)
378#define BTRFS_BLOCK_GROUP_PROFILE_MASK (BTRFS_BLOCK_GROUP_RAID0 | BTRFS_BLOCK_GROUP_RAID1 | BTRFS_BLOCK_GROUP_RAID5 | BTRFS_BLOCK_GROUP_RAID6 | BTRFS_BLOCK_GROUP_DUP | BTRFS_BLOCK_GROUP_RAID10)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700379#define BTRFS_BLOCK_GROUP_RAID56_MASK (BTRFS_BLOCK_GROUP_RAID5 | BTRFS_BLOCK_GROUP_RAID6)
380#define BTRFS_AVAIL_ALLOC_BIT_SINGLE (1ULL << 48)
381#define BTRFS_SPACE_INFO_GLOBAL_RSV (1ULL << 49)
382#define BTRFS_EXTENDED_PROFILE_MASK (BTRFS_BLOCK_GROUP_PROFILE_MASK | BTRFS_AVAIL_ALLOC_BIT_SINGLE)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700383struct btrfs_block_group_item {
384 __le64 used;
385 __le64 chunk_objectid;
386 __le64 flags;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700387} __attribute__((__packed__));
388struct btrfs_free_space_info {
389 __le32 extent_count;
390 __le32 flags;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700391} __attribute__((__packed__));
392#define BTRFS_FREE_SPACE_USING_BITMAPS (1ULL << 0)
393#define BTRFS_QGROUP_LEVEL_SHIFT 48
394#define BTRFS_QGROUP_STATUS_FLAG_ON (1ULL << 0)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700395#define BTRFS_QGROUP_STATUS_FLAG_RESCAN (1ULL << 1)
396#define BTRFS_QGROUP_STATUS_FLAG_INCONSISTENT (1ULL << 2)
397#define BTRFS_QGROUP_STATUS_VERSION 1
398struct btrfs_qgroup_status_item {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700399 __le64 version;
400 __le64 generation;
401 __le64 flags;
402 __le64 rescan;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700403} __attribute__((__packed__));
404struct btrfs_qgroup_info_item {
405 __le64 generation;
406 __le64 rfer;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700407 __le64 rfer_cmpr;
408 __le64 excl;
409 __le64 excl_cmpr;
410} __attribute__((__packed__));
Christopher Ferris106b3a82016-08-24 12:15:38 -0700411struct btrfs_qgroup_limit_item {
412 __le64 flags;
413 __le64 max_rfer;
414 __le64 max_excl;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700415 __le64 rsv_rfer;
416 __le64 rsv_excl;
417} __attribute__((__packed__));
418#endif