[BTRFS]
[reactos.git] / reactos / drivers / filesystems / btrfs / btrfsioctl.h
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 #define FSCTL_BTRFS_GET_FILE_IDS CTL_CODE(FILE_DEVICE_UNKNOWN, 0x829, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
7 #define FSCTL_BTRFS_CREATE_SUBVOL CTL_CODE(FILE_DEVICE_UNKNOWN, 0x82a, METHOD_IN_DIRECT, FILE_ANY_ACCESS)
8 #define FSCTL_BTRFS_CREATE_SNAPSHOT CTL_CODE(FILE_DEVICE_UNKNOWN, 0x82b, METHOD_IN_DIRECT, FILE_ANY_ACCESS)
9 #define FSCTL_BTRFS_GET_INODE_INFO CTL_CODE(FILE_DEVICE_UNKNOWN, 0x82c, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
10 #define FSCTL_BTRFS_SET_INODE_INFO CTL_CODE(FILE_DEVICE_UNKNOWN, 0x82d, METHOD_IN_DIRECT, FILE_ANY_ACCESS)
11
12 typedef struct {
13 UINT64 subvol;
14 UINT64 inode;
15 BOOL top;
16 } btrfs_get_file_ids;
17
18 typedef struct {
19 HANDLE subvol;
20 UINT32 namelen;
21 WCHAR name[1];
22 } btrfs_create_snapshot;
23
24 typedef struct {
25 UINT64 subvol;
26 UINT64 inode;
27 BOOL top;
28 UINT8 type;
29 UINT32 st_uid;
30 UINT32 st_gid;
31 UINT32 st_mode;
32 UINT64 st_rdev;
33 UINT64 flags;
34 UINT32 inline_length;
35 UINT64 disk_size[3];
36 } btrfs_inode_info;
37
38 typedef struct {
39 UINT64 flags;
40 BOOL flags_changed;
41 UINT32 st_uid;
42 BOOL uid_changed;
43 UINT32 st_gid;
44 BOOL gid_changed;
45 UINT32 st_mode;
46 BOOL mode_changed;
47 } btrfs_set_inode_info;
48
49 #endif