ReactOS 0.4.15-dev-7897-g78dc504
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#define FSCTL_BTRFS_GET_CSUM_INFO CTL_CODE(FILE_DEVICE_UNKNOWN, 0x84a, METHOD_BUFFERED, FILE_READ_ACCESS)
41
42typedef struct {
47
48typedef struct {
55
56typedef struct {
63
64#define BTRFS_COMPRESSION_ANY 0
65#define BTRFS_COMPRESSION_ZLIB 1
66#define BTRFS_COMPRESSION_LZO 2
67#define BTRFS_COMPRESSION_ZSTD 3
68
69typedef struct {
88
89typedef struct {
101
102typedef struct {
111 uint64_t stats[5];
115
116typedef struct {
120
121typedef struct {
129
130#define BTRFS_BALANCE_OPTS_ENABLED 0x001
131#define BTRFS_BALANCE_OPTS_PROFILES 0x002
132#define BTRFS_BALANCE_OPTS_DEVID 0x004
133#define BTRFS_BALANCE_OPTS_DRANGE 0x008
134#define BTRFS_BALANCE_OPTS_VRANGE 0x010
135#define BTRFS_BALANCE_OPTS_LIMIT 0x020
136#define BTRFS_BALANCE_OPTS_STRIPES 0x040
137#define BTRFS_BALANCE_OPTS_USAGE 0x080
138#define BTRFS_BALANCE_OPTS_CONVERT 0x100
139#define BTRFS_BALANCE_OPTS_SOFT 0x200
140
141#define BLOCK_FLAG_SINGLE 0x1000000000000 // only used in balance
142
143typedef struct {
159
160#define BTRFS_BALANCE_STOPPED 0
161#define BTRFS_BALANCE_RUNNING 1
162#define BTRFS_BALANCE_PAUSED 2
163#define BTRFS_BALANCE_REMOVAL 4
164#define BTRFS_BALANCE_ERROR 8
165#define BTRFS_BALANCE_SHRINKING 16
166
167typedef struct {
176
177typedef struct {
180
181typedef struct {
187
188typedef struct {
194
195#define BTRFS_SCRUB_STOPPED 0
196#define BTRFS_SCRUB_RUNNING 1
197#define BTRFS_SCRUB_PAUSED 2
198
199typedef struct {
206
207 union {
208 struct {
214
215 struct {
220 };
222
223typedef struct {
235
236typedef struct {
243
244typedef struct {
248
249typedef struct {
252 char data[1];
254
255typedef struct {
261
262typedef struct {
266
267typedef struct {
270 HANDLE clones[1];
272
273typedef struct {
276 void* POINTER_32 clones[1];
278
279typedef struct {
283
284typedef struct {
unsigned short int uint16_t
Definition: acefiex.h:54
LONG NTSTATUS
Definition: precomp.h:26
#define POINTER_32
Definition: basetsd.h:38
UINT32 uint32_t
Definition: types.h:75
UINT64 uint64_t
Definition: types.h:77
static struct all_devices * devices
Definition: dsm_ctrl.c:48
unsigned int BOOL
Definition: ntddk_ex.h:94
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
Definition: msctf.idl:550
const char * filename
Definition: ioapi.h:137
BYTE uint8_t
Definition: msvideo1.c:66
unsigned short USHORT
Definition: pedump.c:61
Definition: btrfs.h:143
uint16_t stripes_start
Definition: btrfsioctl.h:153
uint64_t drange_start
Definition: btrfsioctl.h:147
uint64_t drange_end
Definition: btrfsioctl.h:148
uint64_t limit_start
Definition: btrfsioctl.h:151
uint64_t vrange_start
Definition: btrfsioctl.h:149
uint64_t limit_end
Definition: btrfsioctl.h:152
uint16_t stripes_end
Definition: btrfsioctl.h:154
uint64_t vrange_end
Definition: btrfsioctl.h:150
void *POINTER_32 subvol
Definition: btrfsioctl.h:57
uint64_t num_sectors
Definition: btrfsioctl.h:287
uint8_t csum_length
Definition: btrfsioctl.h:286
uint8_t csum_type
Definition: btrfsioctl.h:285
USHORT namelen
Definition: btrfsioctl.h:112
uint64_t dev_id
Definition: btrfsioctl.h:104
ULONG partition_number
Definition: btrfsioctl.h:110
uint64_t max_size
Definition: btrfsioctl.h:106
uint64_t size
Definition: btrfsioctl.h:105
ULONG device_number
Definition: btrfsioctl.h:109
uint32_t next_entry
Definition: btrfsioctl.h:103
uint32_t next_entry
Definition: btrfsioctl.h:189
uint32_t num_devices
Definition: btrfsioctl.h:191
btrfs_filesystem_device device
Definition: btrfsioctl.h:192
BTRFS_UUID uuid
Definition: btrfsioctl.h:263
uint64_t ctransid
Definition: btrfsioctl.h:264
uint32_t st_mode
Definition: btrfsioctl.h:76
uint64_t disk_size_zlib
Definition: btrfsioctl.h:81
uint32_t inline_length
Definition: btrfsioctl.h:79
uint64_t st_rdev
Definition: btrfsioctl.h:77
uint64_t sparse_size
Definition: btrfsioctl.h:85
uint32_t num_extents
Definition: btrfsioctl.h:86
uint64_t disk_size_lzo
Definition: btrfsioctl.h:82
uint64_t disk_size_zstd
Definition: btrfsioctl.h:84
uint32_t st_gid
Definition: btrfsioctl.h:75
uint64_t flags
Definition: btrfsioctl.h:78
uint32_t st_uid
Definition: btrfsioctl.h:74
uint64_t inode
Definition: btrfsioctl.h:71
uint64_t disk_size_uncompressed
Definition: btrfsioctl.h:80
uint8_t compression_type
Definition: btrfsioctl.h:83
uint64_t subvol
Definition: btrfsioctl.h:70
uint64_t inode
Definition: btrfsioctl.h:237
uint16_t namelen
Definition: btrfsioctl.h:240
uint64_t st_rdev
Definition: btrfsioctl.h:239
uint8_t type
Definition: btrfsioctl.h:238
btrfs_balance_opts data_opts
Definition: btrfsioctl.h:172
uint64_t total_chunks
Definition: btrfsioctl.h:170
btrfs_balance_opts metadata_opts
Definition: btrfsioctl.h:173
uint64_t chunks_left
Definition: btrfsioctl.h:169
btrfs_balance_opts system_opts
Definition: btrfsioctl.h:174
LARGE_INTEGER start_time
Definition: btrfsioctl.h:225
uint64_t chunks_left
Definition: btrfsioctl.h:227
uint32_t num_errors
Definition: btrfsioctl.h:232
LARGE_INTEGER finish_time
Definition: btrfsioctl.h:226
uint64_t duration
Definition: btrfsioctl.h:230
uint64_t data_scrubbed
Definition: btrfsioctl.h:229
uint64_t total_chunks
Definition: btrfsioctl.h:228
btrfs_scrub_error errors
Definition: btrfsioctl.h:233
uint64_t size
Definition: btrfsioctl.h:281
uint64_t device
Definition: btrfsioctl.h:280
uint64_t address
Definition: btrfsioctl.h:201
uint32_t next_entry
Definition: btrfsioctl.h:200
uint16_t filename_length
Definition: btrfsioctl.h:211
void *POINTER_32 parent
Definition: btrfsioctl.h:274
uint8_t compression_type
Definition: btrfsioctl.h:98
BOOL compression_type_changed
Definition: btrfsioctl.h:99
uint32_t next_entry
Definition: btrfsioctl.h:122
uint64_t size
Definition: btrfsioctl.h:124
uint64_t type
Definition: btrfsioctl.h:123
uint64_t num_devices
Definition: btrfsioctl.h:126
uint64_t used
Definition: btrfsioctl.h:125
Definition: name.c:39
uint32_t ULONG
Definition: typedefs.h:59
__wchar_t WCHAR
Definition: xmlstorage.h:180