diff options
Diffstat (limited to 'fs/btrfs/volumes.h')
-rw-r--r-- | fs/btrfs/volumes.h | 54 |
1 files changed, 51 insertions, 3 deletions
diff --git a/fs/btrfs/volumes.h b/fs/btrfs/volumes.h index 78f2d4d4f37f..19ac95048b88 100644 --- a/fs/btrfs/volumes.h +++ b/fs/btrfs/volumes.h | |||
@@ -186,6 +186,51 @@ struct map_lookup { | |||
186 | #define map_lookup_size(n) (sizeof(struct map_lookup) + \ | 186 | #define map_lookup_size(n) (sizeof(struct map_lookup) + \ |
187 | (sizeof(struct btrfs_bio_stripe) * (n))) | 187 | (sizeof(struct btrfs_bio_stripe) * (n))) |
188 | 188 | ||
189 | /* | ||
190 | * Restriper's general type filter | ||
191 | */ | ||
192 | #define BTRFS_BALANCE_DATA (1ULL << 0) | ||
193 | #define BTRFS_BALANCE_SYSTEM (1ULL << 1) | ||
194 | #define BTRFS_BALANCE_METADATA (1ULL << 2) | ||
195 | |||
196 | #define BTRFS_BALANCE_TYPE_MASK (BTRFS_BALANCE_DATA | \ | ||
197 | BTRFS_BALANCE_SYSTEM | \ | ||
198 | BTRFS_BALANCE_METADATA) | ||
199 | |||
200 | #define BTRFS_BALANCE_FORCE (1ULL << 3) | ||
201 | #define BTRFS_BALANCE_RESUME (1ULL << 4) | ||
202 | |||
203 | /* | ||
204 | * Balance filters | ||
205 | */ | ||
206 | #define BTRFS_BALANCE_ARGS_PROFILES (1ULL << 0) | ||
207 | #define BTRFS_BALANCE_ARGS_USAGE (1ULL << 1) | ||
208 | #define BTRFS_BALANCE_ARGS_DEVID (1ULL << 2) | ||
209 | #define BTRFS_BALANCE_ARGS_DRANGE (1ULL << 3) | ||
210 | #define BTRFS_BALANCE_ARGS_VRANGE (1ULL << 4) | ||
211 | |||
212 | /* | ||
213 | * Profile changing flags. When SOFT is set we won't relocate chunk if | ||
214 | * it already has the target profile (even though it may be | ||
215 | * half-filled). | ||
216 | */ | ||
217 | #define BTRFS_BALANCE_ARGS_CONVERT (1ULL << 8) | ||
218 | #define BTRFS_BALANCE_ARGS_SOFT (1ULL << 9) | ||
219 | |||
220 | struct btrfs_balance_args; | ||
221 | struct btrfs_balance_progress; | ||
222 | struct btrfs_balance_control { | ||
223 | struct btrfs_fs_info *fs_info; | ||
224 | |||
225 | struct btrfs_balance_args data; | ||
226 | struct btrfs_balance_args meta; | ||
227 | struct btrfs_balance_args sys; | ||
228 | |||
229 | u64 flags; | ||
230 | |||
231 | struct btrfs_balance_progress stat; | ||
232 | }; | ||
233 | |||
189 | int btrfs_account_dev_extents_size(struct btrfs_device *device, u64 start, | 234 | int btrfs_account_dev_extents_size(struct btrfs_device *device, u64 start, |
190 | u64 end, u64 *length); | 235 | u64 end, u64 *length); |
191 | 236 | ||
@@ -228,9 +273,12 @@ struct btrfs_device *btrfs_find_device(struct btrfs_root *root, u64 devid, | |||
228 | u8 *uuid, u8 *fsid); | 273 | u8 *uuid, u8 *fsid); |
229 | int btrfs_shrink_device(struct btrfs_device *device, u64 new_size); | 274 | int btrfs_shrink_device(struct btrfs_device *device, u64 new_size); |
230 | int btrfs_init_new_device(struct btrfs_root *root, char *path); | 275 | int btrfs_init_new_device(struct btrfs_root *root, char *path); |
231 | int btrfs_balance(struct btrfs_root *dev_root); | 276 | int btrfs_balance(struct btrfs_balance_control *bctl, |
277 | struct btrfs_ioctl_balance_args *bargs); | ||
278 | int btrfs_recover_balance(struct btrfs_root *tree_root); | ||
279 | int btrfs_pause_balance(struct btrfs_fs_info *fs_info); | ||
280 | int btrfs_cancel_balance(struct btrfs_fs_info *fs_info); | ||
232 | int btrfs_chunk_readonly(struct btrfs_root *root, u64 chunk_offset); | 281 | int btrfs_chunk_readonly(struct btrfs_root *root, u64 chunk_offset); |
233 | int find_free_dev_extent(struct btrfs_trans_handle *trans, | 282 | int find_free_dev_extent(struct btrfs_device *device, u64 num_bytes, |
234 | struct btrfs_device *device, u64 num_bytes, | ||
235 | u64 *start, u64 *max_avail); | 283 | u64 *start, u64 *max_avail); |
236 | #endif | 284 | #endif |