diff options
Diffstat (limited to 'fs/btrfs/ioctl.h')
-rw-r--r-- | fs/btrfs/ioctl.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/fs/btrfs/ioctl.h b/fs/btrfs/ioctl.h index 37ac030d64b4..1a638ceeead8 100644 --- a/fs/btrfs/ioctl.h +++ b/fs/btrfs/ioctl.h | |||
@@ -32,6 +32,8 @@ struct btrfs_ioctl_vol_args { | |||
32 | 32 | ||
33 | #define BTRFS_SUBVOL_CREATE_ASYNC (1ULL << 0) | 33 | #define BTRFS_SUBVOL_CREATE_ASYNC (1ULL << 0) |
34 | #define BTRFS_SUBVOL_RDONLY (1ULL << 1) | 34 | #define BTRFS_SUBVOL_RDONLY (1ULL << 1) |
35 | #define BTRFS_FSID_SIZE 16 | ||
36 | #define BTRFS_UUID_SIZE 16 | ||
35 | 37 | ||
36 | #define BTRFS_SUBVOL_NAME_MAX 4039 | 38 | #define BTRFS_SUBVOL_NAME_MAX 4039 |
37 | struct btrfs_ioctl_vol_args_v2 { | 39 | struct btrfs_ioctl_vol_args_v2 { |
@@ -79,6 +81,33 @@ struct btrfs_scrub_progress { | |||
79 | * Intermittent error. */ | 81 | * Intermittent error. */ |
80 | }; | 82 | }; |
81 | 83 | ||
84 | struct btrfs_ioctl_scrub_args { | ||
85 | __u64 devid; /* in */ | ||
86 | __u64 start; /* in */ | ||
87 | __u64 end; /* in */ | ||
88 | __u64 flags; /* in */ | ||
89 | struct btrfs_scrub_progress progress; /* out */ | ||
90 | /* pad to 1k */ | ||
91 | __u64 unused[(1024-32-sizeof(struct btrfs_scrub_progress))/8]; | ||
92 | }; | ||
93 | |||
94 | #define BTRFS_DEVICE_PATH_NAME_MAX 1024 | ||
95 | struct btrfs_ioctl_dev_info_args { | ||
96 | __u64 devid; /* in/out */ | ||
97 | __u8 uuid[BTRFS_UUID_SIZE]; /* in/out */ | ||
98 | __u64 bytes_used; /* out */ | ||
99 | __u64 total_bytes; /* out */ | ||
100 | __u64 unused[379]; /* pad to 4k */ | ||
101 | __u8 path[BTRFS_DEVICE_PATH_NAME_MAX]; /* out */ | ||
102 | }; | ||
103 | |||
104 | struct btrfs_ioctl_fs_info_args { | ||
105 | __u64 max_id; /* out */ | ||
106 | __u64 num_devices; /* out */ | ||
107 | __u8 fsid[BTRFS_FSID_SIZE]; /* out */ | ||
108 | __u64 reserved[124]; /* pad to 1k */ | ||
109 | }; | ||
110 | |||
82 | #define BTRFS_INO_LOOKUP_PATH_MAX 4080 | 111 | #define BTRFS_INO_LOOKUP_PATH_MAX 4080 |
83 | struct btrfs_ioctl_ino_lookup_args { | 112 | struct btrfs_ioctl_ino_lookup_args { |
84 | __u64 treeid; | 113 | __u64 treeid; |
@@ -240,4 +269,13 @@ struct btrfs_ioctl_space_args { | |||
240 | struct btrfs_ioctl_vol_args_v2) | 269 | struct btrfs_ioctl_vol_args_v2) |
241 | #define BTRFS_IOC_SUBVOL_GETFLAGS _IOW(BTRFS_IOCTL_MAGIC, 25, __u64) | 270 | #define BTRFS_IOC_SUBVOL_GETFLAGS _IOW(BTRFS_IOCTL_MAGIC, 25, __u64) |
242 | #define BTRFS_IOC_SUBVOL_SETFLAGS _IOW(BTRFS_IOCTL_MAGIC, 26, __u64) | 271 | #define BTRFS_IOC_SUBVOL_SETFLAGS _IOW(BTRFS_IOCTL_MAGIC, 26, __u64) |
272 | #define BTRFS_IOC_SCRUB _IOWR(BTRFS_IOCTL_MAGIC, 27, \ | ||
273 | struct btrfs_ioctl_scrub_args) | ||
274 | #define BTRFS_IOC_SCRUB_CANCEL _IO(BTRFS_IOCTL_MAGIC, 28) | ||
275 | #define BTRFS_IOC_SCRUB_PROGRESS _IOWR(BTRFS_IOCTL_MAGIC, 29, \ | ||
276 | struct btrfs_ioctl_scrub_args) | ||
277 | #define BTRFS_IOC_DEV_INFO _IOWR(BTRFS_IOCTL_MAGIC, 30, \ | ||
278 | struct btrfs_ioctl_dev_info_args) | ||
279 | #define BTRFS_IOC_FS_INFO _IOR(BTRFS_IOCTL_MAGIC, 31, \ | ||
280 | struct btrfs_ioctl_fs_info_args) | ||
243 | #endif | 281 | #endif |