blob: 557574d33381e0beb18687d860f77848db0ba4dc [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
23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24#define BTRFS_CHUNK_TREE_OBJECTID 3ULL
25#define BTRFS_DEV_TREE_OBJECTID 4ULL
26#define BTRFS_FS_TREE_OBJECTID 5ULL
27#define BTRFS_ROOT_TREE_DIR_OBJECTID 6ULL
28/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29#define BTRFS_CSUM_TREE_OBJECTID 7ULL
30#define BTRFS_QUOTA_TREE_OBJECTID 8ULL
31#define BTRFS_UUID_TREE_OBJECTID 9ULL
32#define BTRFS_FREE_SPACE_TREE_OBJECTID 10ULL
33/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34#define BTRFS_DEV_STATS_OBJECTID 0ULL
35#define BTRFS_BALANCE_OBJECTID - 4ULL
36#define BTRFS_ORPHAN_OBJECTID - 5ULL
37#define BTRFS_TREE_LOG_OBJECTID - 6ULL
38/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39#define BTRFS_TREE_LOG_FIXUP_OBJECTID - 7ULL
40#define BTRFS_TREE_RELOC_OBJECTID - 8ULL
41#define BTRFS_DATA_RELOC_TREE_OBJECTID - 9ULL
42#define BTRFS_EXTENT_CSUM_OBJECTID - 10ULL
43/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44#define BTRFS_FREE_SPACE_OBJECTID - 11ULL
45#define BTRFS_FREE_INO_OBJECTID - 12ULL
46#define BTRFS_MULTIPLE_OBJECTIDS - 255ULL
47#define BTRFS_FIRST_FREE_OBJECTID 256ULL
48/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49#define BTRFS_LAST_FREE_OBJECTID - 256ULL
50#define BTRFS_FIRST_CHUNK_TREE_OBJECTID 256ULL
51#define BTRFS_DEV_ITEMS_OBJECTID 1ULL
52#define BTRFS_BTREE_INODE_OBJECTID 1
53/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54#define BTRFS_EMPTY_SUBVOL_DIR_OBJECTID 2
55#define BTRFS_DEV_REPLACE_DEVID 0ULL
56#define BTRFS_INODE_ITEM_KEY 1
57#define BTRFS_INODE_REF_KEY 12
58/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59#define BTRFS_INODE_EXTREF_KEY 13
60#define BTRFS_XATTR_ITEM_KEY 24
61#define BTRFS_ORPHAN_ITEM_KEY 48
62#define BTRFS_DIR_LOG_ITEM_KEY 60
63/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64#define BTRFS_DIR_LOG_INDEX_KEY 72
65#define BTRFS_DIR_ITEM_KEY 84
66#define BTRFS_DIR_INDEX_KEY 96
67#define BTRFS_EXTENT_DATA_KEY 108
68/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69#define BTRFS_EXTENT_CSUM_KEY 128
70#define BTRFS_ROOT_ITEM_KEY 132
71#define BTRFS_ROOT_BACKREF_KEY 144
72#define BTRFS_ROOT_REF_KEY 156
73/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74#define BTRFS_EXTENT_ITEM_KEY 168
75#define BTRFS_METADATA_ITEM_KEY 169
76#define BTRFS_TREE_BLOCK_REF_KEY 176
77#define BTRFS_EXTENT_DATA_REF_KEY 178
78/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79#define BTRFS_EXTENT_REF_V0_KEY 180
80#define BTRFS_SHARED_BLOCK_REF_KEY 182
81#define BTRFS_SHARED_DATA_REF_KEY 184
82#define BTRFS_BLOCK_GROUP_ITEM_KEY 192
83/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84#define BTRFS_FREE_SPACE_INFO_KEY 198
85#define BTRFS_FREE_SPACE_EXTENT_KEY 199
86#define BTRFS_FREE_SPACE_BITMAP_KEY 200
87#define BTRFS_DEV_EXTENT_KEY 204
88/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89#define BTRFS_DEV_ITEM_KEY 216
90#define BTRFS_CHUNK_ITEM_KEY 228
91#define BTRFS_QGROUP_STATUS_KEY 240
92#define BTRFS_QGROUP_INFO_KEY 242
93/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
94#define BTRFS_QGROUP_LIMIT_KEY 244
95#define BTRFS_QGROUP_RELATION_KEY 246
96#define BTRFS_BALANCE_ITEM_KEY 248
97#define BTRFS_TEMPORARY_ITEM_KEY 248
98/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
99#define BTRFS_DEV_STATS_KEY 249
100#define BTRFS_PERSISTENT_ITEM_KEY 249
101#define BTRFS_DEV_REPLACE_KEY 250
102#if BTRFS_UUID_SIZE != 16
103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
104#error "UUID items require BTRFS_UUID_SIZE == 16!"
105#endif
106#define BTRFS_UUID_KEY_SUBVOL 251
107#define BTRFS_UUID_KEY_RECEIVED_SUBVOL 252
108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
109#define BTRFS_STRING_ITEM_KEY 253
110#define BTRFS_CSUM_SIZE 32
111#define BTRFS_CSUM_TYPE_CRC32 0
112#define BTRFS_FT_UNKNOWN 0
113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
114#define BTRFS_FT_REG_FILE 1
115#define BTRFS_FT_DIR 2
116#define BTRFS_FT_CHRDEV 3
117#define BTRFS_FT_BLKDEV 4
118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
119#define BTRFS_FT_FIFO 5
120#define BTRFS_FT_SOCK 6
121#define BTRFS_FT_SYMLINK 7
122#define BTRFS_FT_XATTR 8
123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
124#define BTRFS_FT_MAX 9
125struct btrfs_disk_key {
126 __le64 objectid;
127 __u8 type;
128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
129 __le64 offset;
130} __attribute__((__packed__));
131struct btrfs_key {
132 __u64 objectid;
133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
134 __u8 type;
135 __u64 offset;
136} __attribute__((__packed__));
137struct btrfs_dev_item {
138/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
139 __le64 devid;
140 __le64 total_bytes;
141 __le64 bytes_used;
142 __le32 io_align;
143/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
144 __le32 io_width;
145 __le32 sector_size;
146 __le64 type;
147 __le64 generation;
148/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
149 __le64 start_offset;
150 __le32 dev_group;
151 __u8 seek_speed;
152 __u8 bandwidth;
153/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
154 __u8 uuid[BTRFS_UUID_SIZE];
155 __u8 fsid[BTRFS_UUID_SIZE];
156} __attribute__((__packed__));
157struct btrfs_stripe {
158/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
159 __le64 devid;
160 __le64 offset;
161 __u8 dev_uuid[BTRFS_UUID_SIZE];
162} __attribute__((__packed__));
163/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
164struct btrfs_chunk {
165 __le64 length;
166 __le64 owner;
167 __le64 stripe_len;
168/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
169 __le64 type;
170 __le32 io_align;
171 __le32 io_width;
172 __le32 sector_size;
173/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
174 __le16 num_stripes;
175 __le16 sub_stripes;
176 struct btrfs_stripe stripe;
177} __attribute__((__packed__));
178/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
179#define BTRFS_FREE_SPACE_EXTENT 1
180#define BTRFS_FREE_SPACE_BITMAP 2
181struct btrfs_free_space_entry {
182 __le64 offset;
183/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
184 __le64 bytes;
185 __u8 type;
186} __attribute__((__packed__));
187struct btrfs_free_space_header {
188/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
189 struct btrfs_disk_key location;
190 __le64 generation;
191 __le64 num_entries;
192 __le64 num_bitmaps;
193/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
194} __attribute__((__packed__));
195#define BTRFS_HEADER_FLAG_WRITTEN (1ULL << 0)
196#define BTRFS_HEADER_FLAG_RELOC (1ULL << 1)
197#define BTRFS_SUPER_FLAG_ERROR (1ULL << 2)
198/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
199#define BTRFS_SUPER_FLAG_SEEDING (1ULL << 32)
200#define BTRFS_SUPER_FLAG_METADUMP (1ULL << 33)
201struct btrfs_extent_item {
202 __le64 refs;
203/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
204 __le64 generation;
205 __le64 flags;
206} __attribute__((__packed__));
207struct btrfs_extent_item_v0 {
208/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
209 __le32 refs;
210} __attribute__((__packed__));
211#define BTRFS_EXTENT_FLAG_DATA (1ULL << 0)
212#define BTRFS_EXTENT_FLAG_TREE_BLOCK (1ULL << 1)
213/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
214#define BTRFS_BLOCK_FLAG_FULL_BACKREF (1ULL << 8)
215#define BTRFS_EXTENT_FLAG_SUPER (1ULL << 48)
216struct btrfs_tree_block_info {
217 struct btrfs_disk_key key;
218/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
219 __u8 level;
220} __attribute__((__packed__));
221struct btrfs_extent_data_ref {
222 __le64 root;
223/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
224 __le64 objectid;
225 __le64 offset;
226 __le32 count;
227} __attribute__((__packed__));
228/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
229struct btrfs_shared_data_ref {
230 __le32 count;
231} __attribute__((__packed__));
232struct btrfs_extent_inline_ref {
233/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
234 __u8 type;
235 __le64 offset;
236} __attribute__((__packed__));
237struct btrfs_extent_ref_v0 {
238/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
239 __le64 root;
240 __le64 generation;
241 __le64 objectid;
242 __le32 count;
243/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
244} __attribute__((__packed__));
245struct btrfs_dev_extent {
246 __le64 chunk_tree;
247 __le64 chunk_objectid;
248/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
249 __le64 chunk_offset;
250 __le64 length;
251 __u8 chunk_tree_uuid[BTRFS_UUID_SIZE];
252} __attribute__((__packed__));
253/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
254struct btrfs_inode_ref {
255 __le64 index;
256 __le16 name_len;
257} __attribute__((__packed__));
258/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
259struct btrfs_inode_extref {
260 __le64 parent_objectid;
261 __le64 index;
262 __le16 name_len;
263/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
264 __u8 name[0];
265} __attribute__((__packed__));
266struct btrfs_timespec {
267 __le64 sec;
268/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
269 __le32 nsec;
270} __attribute__((__packed__));
271struct btrfs_inode_item {
272 __le64 generation;
273/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
274 __le64 transid;
275 __le64 size;
276 __le64 nbytes;
277 __le64 block_group;
278/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
279 __le32 nlink;
280 __le32 uid;
281 __le32 gid;
282 __le32 mode;
283/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
284 __le64 rdev;
285 __le64 flags;
286 __le64 sequence;
287 __le64 reserved[4];
288/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
289 struct btrfs_timespec atime;
290 struct btrfs_timespec ctime;
291 struct btrfs_timespec mtime;
292 struct btrfs_timespec otime;
293/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
294} __attribute__((__packed__));
295struct btrfs_dir_log_item {
296 __le64 end;
297} __attribute__((__packed__));
298/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
299struct btrfs_dir_item {
300 struct btrfs_disk_key location;
301 __le64 transid;
302 __le16 data_len;
303/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
304 __le16 name_len;
305 __u8 type;
306} __attribute__((__packed__));
307#define BTRFS_ROOT_SUBVOL_RDONLY (1ULL << 0)
308/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
309#define BTRFS_ROOT_SUBVOL_DEAD (1ULL << 48)
310struct btrfs_root_item {
311 struct btrfs_inode_item inode;
312 __le64 generation;
313/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
314 __le64 root_dirid;
315 __le64 bytenr;
316 __le64 byte_limit;
317 __le64 bytes_used;
318/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
319 __le64 last_snapshot;
320 __le64 flags;
321 __le32 refs;
322 struct btrfs_disk_key drop_progress;
323/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
324 __u8 drop_level;
325 __u8 level;
326 __le64 generation_v2;
327 __u8 uuid[BTRFS_UUID_SIZE];
328/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
329 __u8 parent_uuid[BTRFS_UUID_SIZE];
330 __u8 received_uuid[BTRFS_UUID_SIZE];
331 __le64 ctransid;
332 __le64 otransid;
333/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
334 __le64 stransid;
335 __le64 rtransid;
336 struct btrfs_timespec ctime;
337 struct btrfs_timespec otime;
338/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
339 struct btrfs_timespec stime;
340 struct btrfs_timespec rtime;
341 __le64 reserved[8];
342} __attribute__((__packed__));
343/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
344struct btrfs_root_ref {
345 __le64 dirid;
346 __le64 sequence;
347 __le16 name_len;
348/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
349} __attribute__((__packed__));
350struct btrfs_disk_balance_args {
351 __le64 profiles;
352 union {
353/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
354 __le64 usage;
355 struct {
356 __le32 usage_min;
357 __le32 usage_max;
358/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
359 };
360 };
361 __le64 devid;
362 __le64 pstart;
363/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
364 __le64 pend;
365 __le64 vstart;
366 __le64 vend;
367 __le64 target;
368/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
369 __le64 flags;
370 union {
371 __le64 limit;
372 struct {
373/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
374 __le32 limit_min;
375 __le32 limit_max;
376 };
377 };
378/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
379 __le32 stripes_min;
380 __le32 stripes_max;
381 __le64 unused[6];
382} __attribute__((__packed__));
383/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
384struct btrfs_balance_item {
385 __le64 flags;
386 struct btrfs_disk_balance_args data;
387 struct btrfs_disk_balance_args meta;
388/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
389 struct btrfs_disk_balance_args sys;
390 __le64 unused[4];
391} __attribute__((__packed__));
392#define BTRFS_FILE_EXTENT_INLINE 0
393/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
394#define BTRFS_FILE_EXTENT_REG 1
395#define BTRFS_FILE_EXTENT_PREALLOC 2
396struct btrfs_file_extent_item {
397 __le64 generation;
398/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
399 __le64 ram_bytes;
400 __u8 compression;
401 __u8 encryption;
402 __le16 other_encoding;
403/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
404 __u8 type;
405 __le64 disk_bytenr;
406 __le64 disk_num_bytes;
407 __le64 offset;
408/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
409 __le64 num_bytes;
410} __attribute__((__packed__));
411struct btrfs_csum_item {
412 __u8 csum;
413/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
414} __attribute__((__packed__));
415struct btrfs_dev_stats_item {
416 __le64 values[BTRFS_DEV_STAT_VALUES_MAX];
417} __attribute__((__packed__));
418/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
419#define BTRFS_DEV_REPLACE_ITEM_CONT_READING_FROM_SRCDEV_MODE_ALWAYS 0
420#define BTRFS_DEV_REPLACE_ITEM_CONT_READING_FROM_SRCDEV_MODE_AVOID 1
421#define BTRFS_DEV_REPLACE_ITEM_STATE_NEVER_STARTED 0
422#define BTRFS_DEV_REPLACE_ITEM_STATE_STARTED 1
423/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
424#define BTRFS_DEV_REPLACE_ITEM_STATE_SUSPENDED 2
425#define BTRFS_DEV_REPLACE_ITEM_STATE_FINISHED 3
426#define BTRFS_DEV_REPLACE_ITEM_STATE_CANCELED 4
427struct btrfs_dev_replace_item {
428/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
429 __le64 src_devid;
430 __le64 cursor_left;
431 __le64 cursor_right;
432 __le64 cont_reading_from_srcdev_mode;
433/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
434 __le64 replace_state;
435 __le64 time_started;
436 __le64 time_stopped;
437 __le64 num_write_errors;
438/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
439 __le64 num_uncorrectable_read_errors;
440} __attribute__((__packed__));
441#define BTRFS_BLOCK_GROUP_DATA (1ULL << 0)
442#define BTRFS_BLOCK_GROUP_SYSTEM (1ULL << 1)
443/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
444#define BTRFS_BLOCK_GROUP_METADATA (1ULL << 2)
445#define BTRFS_BLOCK_GROUP_RAID0 (1ULL << 3)
446#define BTRFS_BLOCK_GROUP_RAID1 (1ULL << 4)
447#define BTRFS_BLOCK_GROUP_DUP (1ULL << 5)
448/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
449#define BTRFS_BLOCK_GROUP_RAID10 (1ULL << 6)
450#define BTRFS_BLOCK_GROUP_RAID5 (1ULL << 7)
451#define BTRFS_BLOCK_GROUP_RAID6 (1ULL << 8)
452#define BTRFS_BLOCK_GROUP_RESERVED (BTRFS_AVAIL_ALLOC_BIT_SINGLE | BTRFS_SPACE_INFO_GLOBAL_RSV)
453/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
454enum btrfs_raid_types {
455 BTRFS_RAID_RAID10,
456 BTRFS_RAID_RAID1,
457 BTRFS_RAID_DUP,
458/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
459 BTRFS_RAID_RAID0,
460 BTRFS_RAID_SINGLE,
461 BTRFS_RAID_RAID5,
462 BTRFS_RAID_RAID6,
463/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
464 BTRFS_NR_RAID_TYPES
465};
466#define BTRFS_BLOCK_GROUP_TYPE_MASK (BTRFS_BLOCK_GROUP_DATA | BTRFS_BLOCK_GROUP_SYSTEM | BTRFS_BLOCK_GROUP_METADATA)
467#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)
468/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
469#define BTRFS_BLOCK_GROUP_RAID56_MASK (BTRFS_BLOCK_GROUP_RAID5 | BTRFS_BLOCK_GROUP_RAID6)
470#define BTRFS_AVAIL_ALLOC_BIT_SINGLE (1ULL << 48)
471#define BTRFS_SPACE_INFO_GLOBAL_RSV (1ULL << 49)
472#define BTRFS_EXTENDED_PROFILE_MASK (BTRFS_BLOCK_GROUP_PROFILE_MASK | BTRFS_AVAIL_ALLOC_BIT_SINGLE)
473/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
474struct btrfs_block_group_item {
475 __le64 used;
476 __le64 chunk_objectid;
477 __le64 flags;
478/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
479} __attribute__((__packed__));
480struct btrfs_free_space_info {
481 __le32 extent_count;
482 __le32 flags;
483/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
484} __attribute__((__packed__));
485#define BTRFS_FREE_SPACE_USING_BITMAPS (1ULL << 0)
486#define BTRFS_QGROUP_LEVEL_SHIFT 48
487#define BTRFS_QGROUP_STATUS_FLAG_ON (1ULL << 0)
488/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
489#define BTRFS_QGROUP_STATUS_FLAG_RESCAN (1ULL << 1)
490#define BTRFS_QGROUP_STATUS_FLAG_INCONSISTENT (1ULL << 2)
491#define BTRFS_QGROUP_STATUS_VERSION 1
492struct btrfs_qgroup_status_item {
493/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
494 __le64 version;
495 __le64 generation;
496 __le64 flags;
497 __le64 rescan;
498/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
499} __attribute__((__packed__));
500struct btrfs_qgroup_info_item {
501 __le64 generation;
502 __le64 rfer;
503/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
504 __le64 rfer_cmpr;
505 __le64 excl;
506 __le64 excl_cmpr;
507} __attribute__((__packed__));
508/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
509struct btrfs_qgroup_limit_item {
510 __le64 flags;
511 __le64 max_rfer;
512 __le64 max_excl;
513/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
514 __le64 rsv_rfer;
515 __le64 rsv_excl;
516} __attribute__((__packed__));
517#endif
518/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */