ReactOS  0.4.13-dev-656-g74bcf30
btrfsioctl.h
Go to the documentation of this file.
1 // No copyright claimed in this file - do what you want with it.
2 
3 #ifndef BTRFSIOCTL_H_DEFINED
4 #define BTRFSIOCTL_H_DEFINED
5 
6 #include "btrfs.h"
7 
8 #define FSCTL_BTRFS_GET_FILE_IDS CTL_CODE(FILE_DEVICE_UNKNOWN, 0x829, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
9 #define FSCTL_BTRFS_CREATE_SUBVOL CTL_CODE(FILE_DEVICE_UNKNOWN, 0x82a, METHOD_IN_DIRECT, FILE_ANY_ACCESS)
10 #define FSCTL_BTRFS_CREATE_SNAPSHOT CTL_CODE(FILE_DEVICE_UNKNOWN, 0x82b, METHOD_IN_DIRECT, FILE_ANY_ACCESS)
11 #define FSCTL_BTRFS_GET_INODE_INFO CTL_CODE(FILE_DEVICE_UNKNOWN, 0x82c, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
12 #define FSCTL_BTRFS_SET_INODE_INFO CTL_CODE(FILE_DEVICE_UNKNOWN, 0x82d, METHOD_IN_DIRECT, FILE_ANY_ACCESS)
13 #define FSCTL_BTRFS_GET_DEVICES CTL_CODE(FILE_DEVICE_UNKNOWN, 0x82e, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
14 #define FSCTL_BTRFS_GET_USAGE CTL_CODE(FILE_DEVICE_UNKNOWN, 0x82f, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
15 #define FSCTL_BTRFS_START_BALANCE CTL_CODE(FILE_DEVICE_UNKNOWN, 0x830, METHOD_IN_DIRECT, FILE_ANY_ACCESS)
16 #define FSCTL_BTRFS_QUERY_BALANCE CTL_CODE(FILE_DEVICE_UNKNOWN, 0x831, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
17 #define FSCTL_BTRFS_PAUSE_BALANCE CTL_CODE(FILE_DEVICE_UNKNOWN, 0x832, METHOD_IN_DIRECT, FILE_ANY_ACCESS)
18 #define FSCTL_BTRFS_RESUME_BALANCE CTL_CODE(FILE_DEVICE_UNKNOWN, 0x833, METHOD_IN_DIRECT, FILE_ANY_ACCESS)
19 #define FSCTL_BTRFS_STOP_BALANCE CTL_CODE(FILE_DEVICE_UNKNOWN, 0x834, METHOD_IN_DIRECT, FILE_ANY_ACCESS)
20 #define FSCTL_BTRFS_ADD_DEVICE CTL_CODE(FILE_DEVICE_UNKNOWN, 0x835, METHOD_IN_DIRECT, FILE_ANY_ACCESS)
21 #define FSCTL_BTRFS_REMOVE_DEVICE CTL_CODE(FILE_DEVICE_UNKNOWN, 0x836, METHOD_IN_DIRECT, FILE_ANY_ACCESS)
22 #define IOCTL_BTRFS_QUERY_FILESYSTEMS CTL_CODE(FILE_DEVICE_UNKNOWN, 0x837, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
23 #define FSCTL_BTRFS_GET_UUID CTL_CODE(FILE_DEVICE_UNKNOWN, 0x838, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
24 #define FSCTL_BTRFS_START_SCRUB CTL_CODE(FILE_DEVICE_UNKNOWN, 0x839, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
25 #define FSCTL_BTRFS_QUERY_SCRUB CTL_CODE(FILE_DEVICE_UNKNOWN, 0x83a, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
26 #define FSCTL_BTRFS_PAUSE_SCRUB CTL_CODE(FILE_DEVICE_UNKNOWN, 0x83b, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
27 #define FSCTL_BTRFS_RESUME_SCRUB CTL_CODE(FILE_DEVICE_UNKNOWN, 0x83c, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
28 #define FSCTL_BTRFS_STOP_SCRUB CTL_CODE(FILE_DEVICE_UNKNOWN, 0x83d, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
29 #define IOCTL_BTRFS_PROBE_VOLUME CTL_CODE(FILE_DEVICE_UNKNOWN, 0x83e, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
30 #define FSCTL_BTRFS_RESET_STATS CTL_CODE(FILE_DEVICE_UNKNOWN, 0x83f, METHOD_IN_DIRECT, FILE_ANY_ACCESS)
31 #define FSCTL_BTRFS_MKNOD CTL_CODE(FILE_DEVICE_UNKNOWN, 0x840, METHOD_IN_DIRECT, FILE_ANY_ACCESS)
32 #define FSCTL_BTRFS_RECEIVED_SUBVOL CTL_CODE(FILE_DEVICE_UNKNOWN, 0x841, METHOD_IN_DIRECT, FILE_ANY_ACCESS)
33 #define FSCTL_BTRFS_GET_XATTRS CTL_CODE(FILE_DEVICE_UNKNOWN, 0x842, METHOD_BUFFERED, FILE_ANY_ACCESS)
34 #define FSCTL_BTRFS_SET_XATTR CTL_CODE(FILE_DEVICE_UNKNOWN, 0x843, METHOD_IN_DIRECT, FILE_ANY_ACCESS)
35 #define FSCTL_BTRFS_RESERVE_SUBVOL CTL_CODE(FILE_DEVICE_UNKNOWN, 0x844, METHOD_IN_DIRECT, FILE_ANY_ACCESS)
36 #define FSCTL_BTRFS_FIND_SUBVOL CTL_CODE(FILE_DEVICE_UNKNOWN, 0x845, METHOD_BUFFERED, FILE_ANY_ACCESS)
37 #define FSCTL_BTRFS_SEND_SUBVOL CTL_CODE(FILE_DEVICE_UNKNOWN, 0x846, METHOD_BUFFERED, FILE_ANY_ACCESS)
38 #define FSCTL_BTRFS_READ_SEND_BUFFER CTL_CODE(FILE_DEVICE_UNKNOWN, 0x847, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
39 #define FSCTL_BTRFS_RESIZE CTL_CODE(FILE_DEVICE_UNKNOWN, 0x848, METHOD_IN_DIRECT, FILE_ANY_ACCESS)
40 
41 typedef struct {
46 
47 typedef struct {
52  WCHAR name[1];
54 
55 typedef struct {
60  WCHAR name[1];
62 
63 #define BTRFS_COMPRESSION_ANY 0
64 #define BTRFS_COMPRESSION_ZLIB 1
65 #define BTRFS_COMPRESSION_LZO 2
66 #define BTRFS_COMPRESSION_ZSTD 3
67 
68 typedef struct {
79  UINT64 disk_size[3];
82 
83 typedef struct {
101 
102 typedef struct {
114 
115 typedef struct {
124  UINT64 stats[5];
127 } btrfs_device;
128 
129 typedef struct {
133 
134 typedef struct {
141 } btrfs_usage;
142 
143 #define BTRFS_BALANCE_OPTS_ENABLED 0x001
144 #define BTRFS_BALANCE_OPTS_PROFILES 0x002
145 #define BTRFS_BALANCE_OPTS_DEVID 0x004
146 #define BTRFS_BALANCE_OPTS_DRANGE 0x008
147 #define BTRFS_BALANCE_OPTS_VRANGE 0x010
148 #define BTRFS_BALANCE_OPTS_LIMIT 0x020
149 #define BTRFS_BALANCE_OPTS_STRIPES 0x040
150 #define BTRFS_BALANCE_OPTS_USAGE 0x080
151 #define BTRFS_BALANCE_OPTS_CONVERT 0x100
152 #define BTRFS_BALANCE_OPTS_SOFT 0x200
153 
154 #define BLOCK_FLAG_SINGLE 0x1000000000000 // only used in balance
155 
156 typedef struct {
172 
173 #define BTRFS_BALANCE_STOPPED 0
174 #define BTRFS_BALANCE_RUNNING 1
175 #define BTRFS_BALANCE_PAUSED 2
176 #define BTRFS_BALANCE_REMOVAL 4
177 #define BTRFS_BALANCE_ERROR 8
178 #define BTRFS_BALANCE_SHRINKING 16
179 
180 typedef struct {
189 
190 typedef struct {
193 
194 typedef struct {
195  UINT8 uuid[16];
200 
201 typedef struct {
203  UINT8 uuid[16];
207 
208 #define BTRFS_SCRUB_STOPPED 0
209 #define BTRFS_SCRUB_RUNNING 1
210 #define BTRFS_SCRUB_PAUSED 2
211 
212 typedef struct {
219 
220  union {
221  struct {
226  } data;
227 
228  struct {
232  } metadata;
233  };
235 
236 typedef struct {
248 
249 typedef struct {
255 } btrfs_mknod;
256 
257 typedef struct {
261 
262 typedef struct {
265  char data[1];
267 
268 typedef struct {
274 
275 typedef struct {
279 
280 typedef struct {
283  HANDLE clones[1];
285 
286 typedef struct {
289  void* POINTER_32 clones[1];
291 
292 typedef struct {
295 } btrfs_resize;
296 
297 #endif
btrfs_scrub_error errors
Definition: btrfsioctl.h:246
UINT64 num_devices
Definition: btrfsioctl.h:139
USHORT namelen
Definition: btrfsioctl.h:125
btrfs_balance_opts metadata_opts
Definition: btrfsioctl.h:186
LARGE_INTEGER start_time
Definition: btrfsioctl.h:238
void *POINTER_32 parent
Definition: btrfsioctl.h:287
UINT8 compression_type
Definition: btrfsioctl.h:97
UINT64 size
Definition: btrfsioctl.h:137
#define POINTER_32
Definition: basetsd.h:38
const char * devices
Definition: diskspace.c:793
LONG NTSTATUS
Definition: precomp.h:26
UINT64 st_rdev
Definition: btrfsioctl.h:252
UINT64 dev_id
Definition: btrfsioctl.h:117
UINT64 disk_size_zstd
Definition: btrfsioctl.h:98
UINT32 inline_length
Definition: btrfsioctl.h:78
btrfs_balance_opts data_opts
Definition: btrfsioctl.h:185
const char * filename
Definition: ioapi.h:135
UINT16 namelen
Definition: btrfsioctl.h:253
UINT8 type
Definition: btrfsioctl.h:251
ULONG device_number
Definition: btrfsioctl.h:122
unsigned int UINT32
unsigned int BOOL
Definition: ntddk_ex.h:94
BTRFS_UUID uuid
Definition: btrfsioctl.h:276
UINT8 compression_type
Definition: btrfsioctl.h:80
ULONG partition_number
Definition: btrfsioctl.h:123
__wchar_t WCHAR
Definition: xmlstorage.h:180
UINT64 data_scrubbed
Definition: btrfsioctl.h:242
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
UINT64 inode
Definition: btrfsioctl.h:250
UINT16 filename_length
Definition: btrfsioctl.h:224
UINT32 num_devices
Definition: btrfsioctl.h:204
UINT64 disk_size_zlib
Definition: btrfsioctl.h:95
UINT64 type
Definition: btrfsioctl.h:136
void *POINTER_32 subvol
Definition: btrfsioctl.h:56
Definition: btrfs.h:125
UINT64 device
Definition: btrfsioctl.h:293
btrfs_balance_opts system_opts
Definition: btrfsioctl.h:187
unsigned short USHORT
Definition: pedump.c:61
UINT32 next_entry
Definition: btrfsioctl.h:116
LARGE_INTEGER finish_time
Definition: btrfsioctl.h:239
unsigned short UINT16
UINT32 next_entry
Definition: btrfsioctl.h:135
UINT64 sparse_size
Definition: btrfsioctl.h:99
UINT64 size
Definition: btrfsioctl.h:294
UINT64 disk_size_lzo
Definition: btrfsioctl.h:96
Definition: name.c:36
Definition: msctf.idl:510
unsigned int ULONG
Definition: retypes.h:1
UINT64 disk_size_uncompressed
Definition: btrfsioctl.h:94
UINT64 max_size
Definition: btrfsioctl.h:119
unsigned long long UINT64
unsigned char UINT8
btrfs_filesystem_device device
Definition: btrfsioctl.h:205
UINT64 size
Definition: btrfsioctl.h:118
UINT64 used
Definition: btrfsioctl.h:138
UINT32 inline_length
Definition: btrfsioctl.h:93