ReactOS  0.4.14-dev-57-g333b8f1
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 
40 typedef struct {
45 
46 typedef struct {
51  WCHAR name[1];
53 
54 typedef struct {
59  WCHAR name[1];
61 
62 #define BTRFS_COMPRESSION_ANY 0
63 #define BTRFS_COMPRESSION_ZLIB 1
64 #define BTRFS_COMPRESSION_LZO 2
65 #define BTRFS_COMPRESSION_ZSTD 3
66 
67 typedef struct {
86 
87 typedef struct {
99 
100 typedef struct {
109  uint64_t stats[5];
112 } btrfs_device;
113 
114 typedef struct {
118 
119 typedef struct {
126 } btrfs_usage;
127 
128 #define BTRFS_BALANCE_OPTS_ENABLED 0x001
129 #define BTRFS_BALANCE_OPTS_PROFILES 0x002
130 #define BTRFS_BALANCE_OPTS_DEVID 0x004
131 #define BTRFS_BALANCE_OPTS_DRANGE 0x008
132 #define BTRFS_BALANCE_OPTS_VRANGE 0x010
133 #define BTRFS_BALANCE_OPTS_LIMIT 0x020
134 #define BTRFS_BALANCE_OPTS_STRIPES 0x040
135 #define BTRFS_BALANCE_OPTS_USAGE 0x080
136 #define BTRFS_BALANCE_OPTS_CONVERT 0x100
137 #define BTRFS_BALANCE_OPTS_SOFT 0x200
138 
139 #define BLOCK_FLAG_SINGLE 0x1000000000000 // only used in balance
140 
141 typedef struct {
157 
158 #define BTRFS_BALANCE_STOPPED 0
159 #define BTRFS_BALANCE_RUNNING 1
160 #define BTRFS_BALANCE_PAUSED 2
161 #define BTRFS_BALANCE_REMOVAL 4
162 #define BTRFS_BALANCE_ERROR 8
163 #define BTRFS_BALANCE_SHRINKING 16
164 
165 typedef struct {
174 
175 typedef struct {
178 
179 typedef struct {
185 
186 typedef struct {
192 
193 #define BTRFS_SCRUB_STOPPED 0
194 #define BTRFS_SCRUB_RUNNING 1
195 #define BTRFS_SCRUB_PAUSED 2
196 
197 typedef struct {
204 
205  union {
206  struct {
211  } data;
212 
213  struct {
217  } metadata;
218  };
220 
221 typedef struct {
233 
234 typedef struct {
240 } btrfs_mknod;
241 
242 typedef struct {
246 
247 typedef struct {
250  char data[1];
252 
253 typedef struct {
259 
260 typedef struct {
264 
265 typedef struct {
268  HANDLE clones[1];
270 
271 typedef struct {
274  void* POINTER_32 clones[1];
276 
277 typedef struct {
280 } btrfs_resize;
btrfs_scrub_error errors
Definition: btrfsioctl.h:231
uint64_t total_chunks
Definition: btrfsioctl.h:168
uint32_t next_entry
Definition: btrfsioctl.h:198
uint16_t namelen
Definition: btrfsioctl.h:238
uint64_t type
Definition: btrfsioctl.h:121
USHORT namelen
Definition: btrfsioctl.h:110
btrfs_balance_opts metadata_opts
Definition: btrfsioctl.h:171
LARGE_INTEGER start_time
Definition: btrfsioctl.h:223
uint64_t used
Definition: btrfsioctl.h:123
void *POINTER_32 parent
Definition: btrfsioctl.h:272
uint64_t num_devices
Definition: btrfsioctl.h:124
uint64_t disk_size_lzo
Definition: btrfsioctl.h:80
uint8_t compression_type
Definition: btrfsioctl.h:96
#define POINTER_32
Definition: basetsd.h:38
uint64_t data_scrubbed
Definition: btrfsioctl.h:227
uint64_t total_chunks
Definition: btrfsioctl.h:226
uint32_t num_errors
Definition: btrfsioctl.h:230
uint32_t next_entry
Definition: btrfsioctl.h:101
uint64_t size
Definition: btrfsioctl.h:279
const char * devices
Definition: diskspace.c:793
uint64_t chunks_left
Definition: btrfsioctl.h:167
LONG NTSTATUS
Definition: precomp.h:26
uint32_t st_uid
Definition: btrfsioctl.h:72
uint16_t stripes_end
Definition: btrfsioctl.h:152
uint32_t next_entry
Definition: btrfsioctl.h:120
uint32_t num_extents
Definition: btrfsioctl.h:84
unsigned short int uint16_t
Definition: acefiex.h:54
btrfs_balance_opts data_opts
Definition: btrfsioctl.h:170
const char * filename
Definition: ioapi.h:135
uint64_t disk_size_zstd
Definition: btrfsioctl.h:82
uint32_t st_mode
Definition: btrfsioctl.h:74
uint64_t limit_start
Definition: btrfsioctl.h:149
uint16_t filename_length
Definition: btrfsioctl.h:209
uint64_t vrange_start
Definition: btrfsioctl.h:147
ULONG device_number
Definition: btrfsioctl.h:107
uint32_t num_devices
Definition: btrfsioctl.h:189
uint32_t inline_length
Definition: btrfsioctl.h:77
uint32_t st_gid
Definition: btrfsioctl.h:73
uint64_t address
Definition: btrfsioctl.h:199
unsigned int BOOL
Definition: ntddk_ex.h:94
BTRFS_UUID uuid
Definition: btrfsioctl.h:261
uint64_t size
Definition: btrfsioctl.h:122
uint64_t st_rdev
Definition: btrfsioctl.h:75
ULONG partition_number
Definition: btrfsioctl.h:108
uint64_t limit_end
Definition: btrfsioctl.h:150
__wchar_t WCHAR
Definition: xmlstorage.h:180
uint64_t duration
Definition: btrfsioctl.h:228
uint64_t drange_end
Definition: btrfsioctl.h:146
uint32_t next_entry
Definition: btrfsioctl.h:187
uint64_t disk_size_zlib
Definition: btrfsioctl.h:79
uint64_t flags
Definition: btrfsioctl.h:76
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
BOOL compression_type_changed
Definition: btrfsioctl.h:97
uint64_t inode
Definition: btrfsioctl.h:69
BYTE uint8_t
Definition: msvideo1.c:66
void *POINTER_32 subvol
Definition: btrfsioctl.h:55
uint64_t st_rdev
Definition: btrfsioctl.h:237
uint8_t type
Definition: btrfsioctl.h:236
Definition: btrfs.h:126
UINT64 uint64_t
Definition: types.h:77
uint16_t stripes_start
Definition: btrfsioctl.h:151
btrfs_balance_opts system_opts
Definition: btrfsioctl.h:172
unsigned short USHORT
Definition: pedump.c:61
LARGE_INTEGER finish_time
Definition: btrfsioctl.h:224
uint64_t vrange_end
Definition: btrfsioctl.h:148
uint64_t drange_start
Definition: btrfsioctl.h:145
UINT32 uint32_t
Definition: types.h:75
uint64_t max_size
Definition: btrfsioctl.h:104
uint64_t dev_id
Definition: btrfsioctl.h:102
uint64_t inode
Definition: btrfsioctl.h:235
Definition: name.c:36
uint8_t compression_type
Definition: btrfsioctl.h:81
Definition: msctf.idl:510
unsigned int ULONG
Definition: retypes.h:1
uint64_t device
Definition: btrfsioctl.h:278
uint64_t chunks_left
Definition: btrfsioctl.h:225
uint64_t sparse_size
Definition: btrfsioctl.h:83
uint64_t disk_size_uncompressed
Definition: btrfsioctl.h:78
uint64_t subvol
Definition: btrfsioctl.h:68
uint64_t ctransid
Definition: btrfsioctl.h:262
btrfs_filesystem_device device
Definition: btrfsioctl.h:190
uint64_t size
Definition: btrfsioctl.h:103