ReactOS  0.4.14-dev-608-gd495a4f
btrfsioctl.h
Go to the documentation of this file.
1 // No copyright claimed in this file - do what you want with it.
2 
3 #pragma once
4 
5 #include "btrfs.h"
6 
7 #define FSCTL_BTRFS_GET_FILE_IDS CTL_CODE(FILE_DEVICE_UNKNOWN, 0x829, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
8 #define FSCTL_BTRFS_CREATE_SUBVOL CTL_CODE(FILE_DEVICE_UNKNOWN, 0x82a, METHOD_IN_DIRECT, FILE_ANY_ACCESS)
9 #define FSCTL_BTRFS_CREATE_SNAPSHOT CTL_CODE(FILE_DEVICE_UNKNOWN, 0x82b, METHOD_IN_DIRECT, FILE_ANY_ACCESS)
10 #define FSCTL_BTRFS_GET_INODE_INFO CTL_CODE(FILE_DEVICE_UNKNOWN, 0x82c, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
11 #define FSCTL_BTRFS_SET_INODE_INFO CTL_CODE(FILE_DEVICE_UNKNOWN, 0x82d, METHOD_IN_DIRECT, FILE_ANY_ACCESS)
12 #define FSCTL_BTRFS_GET_DEVICES CTL_CODE(FILE_DEVICE_UNKNOWN, 0x82e, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
13 #define FSCTL_BTRFS_GET_USAGE CTL_CODE(FILE_DEVICE_UNKNOWN, 0x82f, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
14 #define FSCTL_BTRFS_START_BALANCE CTL_CODE(FILE_DEVICE_UNKNOWN, 0x830, METHOD_IN_DIRECT, FILE_ANY_ACCESS)
15 #define FSCTL_BTRFS_QUERY_BALANCE CTL_CODE(FILE_DEVICE_UNKNOWN, 0x831, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
16 #define FSCTL_BTRFS_PAUSE_BALANCE CTL_CODE(FILE_DEVICE_UNKNOWN, 0x832, METHOD_IN_DIRECT, FILE_ANY_ACCESS)
17 #define FSCTL_BTRFS_RESUME_BALANCE CTL_CODE(FILE_DEVICE_UNKNOWN, 0x833, METHOD_IN_DIRECT, FILE_ANY_ACCESS)
18 #define FSCTL_BTRFS_STOP_BALANCE CTL_CODE(FILE_DEVICE_UNKNOWN, 0x834, METHOD_IN_DIRECT, FILE_ANY_ACCESS)
19 #define FSCTL_BTRFS_ADD_DEVICE CTL_CODE(FILE_DEVICE_UNKNOWN, 0x835, METHOD_IN_DIRECT, FILE_ANY_ACCESS)
20 #define FSCTL_BTRFS_REMOVE_DEVICE CTL_CODE(FILE_DEVICE_UNKNOWN, 0x836, METHOD_IN_DIRECT, FILE_ANY_ACCESS)
21 #define IOCTL_BTRFS_QUERY_FILESYSTEMS CTL_CODE(FILE_DEVICE_UNKNOWN, 0x837, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
22 #define FSCTL_BTRFS_GET_UUID CTL_CODE(FILE_DEVICE_UNKNOWN, 0x838, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
23 #define FSCTL_BTRFS_START_SCRUB CTL_CODE(FILE_DEVICE_UNKNOWN, 0x839, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
24 #define FSCTL_BTRFS_QUERY_SCRUB CTL_CODE(FILE_DEVICE_UNKNOWN, 0x83a, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
25 #define FSCTL_BTRFS_PAUSE_SCRUB CTL_CODE(FILE_DEVICE_UNKNOWN, 0x83b, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
26 #define FSCTL_BTRFS_RESUME_SCRUB CTL_CODE(FILE_DEVICE_UNKNOWN, 0x83c, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
27 #define FSCTL_BTRFS_STOP_SCRUB CTL_CODE(FILE_DEVICE_UNKNOWN, 0x83d, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
28 #define IOCTL_BTRFS_PROBE_VOLUME CTL_CODE(FILE_DEVICE_UNKNOWN, 0x83e, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
29 #define FSCTL_BTRFS_RESET_STATS CTL_CODE(FILE_DEVICE_UNKNOWN, 0x83f, METHOD_IN_DIRECT, FILE_ANY_ACCESS)
30 #define FSCTL_BTRFS_MKNOD CTL_CODE(FILE_DEVICE_UNKNOWN, 0x840, METHOD_IN_DIRECT, FILE_ANY_ACCESS)
31 #define FSCTL_BTRFS_RECEIVED_SUBVOL CTL_CODE(FILE_DEVICE_UNKNOWN, 0x841, METHOD_IN_DIRECT, FILE_ANY_ACCESS)
32 #define FSCTL_BTRFS_GET_XATTRS CTL_CODE(FILE_DEVICE_UNKNOWN, 0x842, METHOD_BUFFERED, FILE_ANY_ACCESS)
33 #define FSCTL_BTRFS_SET_XATTR CTL_CODE(FILE_DEVICE_UNKNOWN, 0x843, METHOD_IN_DIRECT, FILE_ANY_ACCESS)
34 #define FSCTL_BTRFS_RESERVE_SUBVOL CTL_CODE(FILE_DEVICE_UNKNOWN, 0x844, METHOD_IN_DIRECT, FILE_ANY_ACCESS)
35 #define FSCTL_BTRFS_FIND_SUBVOL CTL_CODE(FILE_DEVICE_UNKNOWN, 0x845, METHOD_BUFFERED, FILE_ANY_ACCESS)
36 #define FSCTL_BTRFS_SEND_SUBVOL CTL_CODE(FILE_DEVICE_UNKNOWN, 0x846, METHOD_BUFFERED, FILE_ANY_ACCESS)
37 #define FSCTL_BTRFS_READ_SEND_BUFFER CTL_CODE(FILE_DEVICE_UNKNOWN, 0x847, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
38 #define FSCTL_BTRFS_RESIZE CTL_CODE(FILE_DEVICE_UNKNOWN, 0x848, METHOD_IN_DIRECT, FILE_ANY_ACCESS)
39 #define IOCTL_BTRFS_UNLOAD CTL_CODE(FILE_DEVICE_UNKNOWN, 0x849, METHOD_NEITHER, 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 {
87 
88 typedef struct {
100 
101 typedef struct {
110  uint64_t stats[5];
113 } btrfs_device;
114 
115 typedef struct {
119 
120 typedef struct {
127 } btrfs_usage;
128 
129 #define BTRFS_BALANCE_OPTS_ENABLED 0x001
130 #define BTRFS_BALANCE_OPTS_PROFILES 0x002
131 #define BTRFS_BALANCE_OPTS_DEVID 0x004
132 #define BTRFS_BALANCE_OPTS_DRANGE 0x008
133 #define BTRFS_BALANCE_OPTS_VRANGE 0x010
134 #define BTRFS_BALANCE_OPTS_LIMIT 0x020
135 #define BTRFS_BALANCE_OPTS_STRIPES 0x040
136 #define BTRFS_BALANCE_OPTS_USAGE 0x080
137 #define BTRFS_BALANCE_OPTS_CONVERT 0x100
138 #define BTRFS_BALANCE_OPTS_SOFT 0x200
139 
140 #define BLOCK_FLAG_SINGLE 0x1000000000000 // only used in balance
141 
142 typedef struct {
158 
159 #define BTRFS_BALANCE_STOPPED 0
160 #define BTRFS_BALANCE_RUNNING 1
161 #define BTRFS_BALANCE_PAUSED 2
162 #define BTRFS_BALANCE_REMOVAL 4
163 #define BTRFS_BALANCE_ERROR 8
164 #define BTRFS_BALANCE_SHRINKING 16
165 
166 typedef struct {
175 
176 typedef struct {
179 
180 typedef struct {
186 
187 typedef struct {
193 
194 #define BTRFS_SCRUB_STOPPED 0
195 #define BTRFS_SCRUB_RUNNING 1
196 #define BTRFS_SCRUB_PAUSED 2
197 
198 typedef struct {
205 
206  union {
207  struct {
212  } data;
213 
214  struct {
218  } metadata;
219  };
221 
222 typedef struct {
234 
235 typedef struct {
241 } btrfs_mknod;
242 
243 typedef struct {
247 
248 typedef struct {
251  char data[1];
253 
254 typedef struct {
260 
261 typedef struct {
265 
266 typedef struct {
269  HANDLE clones[1];
271 
272 typedef struct {
275  void* POINTER_32 clones[1];
277 
278 typedef struct {
281 } btrfs_resize;
btrfs_scrub_error errors
Definition: btrfsioctl.h:232
uint64_t total_chunks
Definition: btrfsioctl.h:169
uint32_t next_entry
Definition: btrfsioctl.h:199
uint16_t namelen
Definition: btrfsioctl.h:239
uint64_t type
Definition: btrfsioctl.h:122
USHORT namelen
Definition: btrfsioctl.h:111
btrfs_balance_opts metadata_opts
Definition: btrfsioctl.h:172
LARGE_INTEGER start_time
Definition: btrfsioctl.h:224
uint64_t used
Definition: btrfsioctl.h:124
void *POINTER_32 parent
Definition: btrfsioctl.h:273
uint64_t num_devices
Definition: btrfsioctl.h:125
uint64_t disk_size_lzo
Definition: btrfsioctl.h:81
uint8_t compression_type
Definition: btrfsioctl.h:97
#define POINTER_32
Definition: basetsd.h:38
uint64_t data_scrubbed
Definition: btrfsioctl.h:228
uint64_t total_chunks
Definition: btrfsioctl.h:227
uint32_t num_errors
Definition: btrfsioctl.h:231
uint32_t next_entry
Definition: btrfsioctl.h:102
uint64_t size
Definition: btrfsioctl.h:280
const char * devices
Definition: diskspace.c:793
uint64_t chunks_left
Definition: btrfsioctl.h:168
LONG NTSTATUS
Definition: precomp.h:26
uint32_t st_uid
Definition: btrfsioctl.h:73
uint16_t stripes_end
Definition: btrfsioctl.h:153
uint32_t next_entry
Definition: btrfsioctl.h:121
uint32_t num_extents
Definition: btrfsioctl.h:85
unsigned short int uint16_t
Definition: acefiex.h:54
btrfs_balance_opts data_opts
Definition: btrfsioctl.h:171
const char * filename
Definition: ioapi.h:135
uint64_t disk_size_zstd
Definition: btrfsioctl.h:83
uint32_t st_mode
Definition: btrfsioctl.h:75
uint64_t limit_start
Definition: btrfsioctl.h:150
uint16_t filename_length
Definition: btrfsioctl.h:210
uint64_t vrange_start
Definition: btrfsioctl.h:148
ULONG device_number
Definition: btrfsioctl.h:108
uint32_t num_devices
Definition: btrfsioctl.h:190
uint32_t inline_length
Definition: btrfsioctl.h:78
uint32_t st_gid
Definition: btrfsioctl.h:74
uint64_t address
Definition: btrfsioctl.h:200
unsigned int BOOL
Definition: ntddk_ex.h:94
BTRFS_UUID uuid
Definition: btrfsioctl.h:262
uint64_t size
Definition: btrfsioctl.h:123
uint64_t st_rdev
Definition: btrfsioctl.h:76
ULONG partition_number
Definition: btrfsioctl.h:109
uint64_t limit_end
Definition: btrfsioctl.h:151
__wchar_t WCHAR
Definition: xmlstorage.h:180
uint64_t duration
Definition: btrfsioctl.h:229
uint64_t drange_end
Definition: btrfsioctl.h:147
uint32_t next_entry
Definition: btrfsioctl.h:188
uint64_t disk_size_zlib
Definition: btrfsioctl.h:80
uint64_t flags
Definition: btrfsioctl.h:77
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
BOOL compression_type_changed
Definition: btrfsioctl.h:98
uint64_t inode
Definition: btrfsioctl.h:70
BYTE uint8_t
Definition: msvideo1.c:66
void *POINTER_32 subvol
Definition: btrfsioctl.h:56
uint64_t st_rdev
Definition: btrfsioctl.h:238
uint8_t type
Definition: btrfsioctl.h:237
Definition: btrfs.h:127
UINT64 uint64_t
Definition: types.h:77
uint16_t stripes_start
Definition: btrfsioctl.h:152
btrfs_balance_opts system_opts
Definition: btrfsioctl.h:173
unsigned short USHORT
Definition: pedump.c:61
LARGE_INTEGER finish_time
Definition: btrfsioctl.h:225
uint64_t vrange_end
Definition: btrfsioctl.h:149
uint64_t drange_start
Definition: btrfsioctl.h:146
UINT32 uint32_t
Definition: types.h:75
uint64_t max_size
Definition: btrfsioctl.h:105
uint64_t dev_id
Definition: btrfsioctl.h:103
uint64_t inode
Definition: btrfsioctl.h:236
Definition: name.c:38
uint8_t compression_type
Definition: btrfsioctl.h:82
Definition: msctf.idl:510
unsigned int ULONG
Definition: retypes.h:1
uint64_t device
Definition: btrfsioctl.h:279
uint64_t chunks_left
Definition: btrfsioctl.h:226
uint64_t sparse_size
Definition: btrfsioctl.h:84
uint64_t disk_size_uncompressed
Definition: btrfsioctl.h:79
uint64_t subvol
Definition: btrfsioctl.h:69
uint64_t ctransid
Definition: btrfsioctl.h:263
btrfs_filesystem_device device
Definition: btrfsioctl.h:191
uint64_t size
Definition: btrfsioctl.h:104