aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/volumes.h
diff options
context:
space:
mode:
authorIlya Dryomov <idryomov@gmail.com>2012-01-16 15:04:47 -0500
committerIlya Dryomov <idryomov@gmail.com>2012-01-16 15:04:47 -0500
commitc9e9f97bdfb64d06e9520f8e4f37674ac21cc9bc (patch)
tree22d695a7a461068c773b327e5c89a045ade5d8a3 /fs/btrfs/volumes.h
parent10ea00f55a07f8f9536d9112b95108a86f700bab (diff)
Btrfs: add basic restriper infrastructure
Add basic restriper infrastructure: extended balancing ioctl and all related ioctl data structures, add data structure for tracking restriper's state to fs_info, etc. The semantics of the old balancing ioctl are fully preserved. Explicitly disallow any volume operations when balance is in progress. Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/btrfs/volumes.h')
-rw-r--r--fs/btrfs/volumes.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/fs/btrfs/volumes.h b/fs/btrfs/volumes.h
index 78f2d4d4f37f..882582385283 100644
--- a/fs/btrfs/volumes.h
+++ b/fs/btrfs/volumes.h
@@ -186,6 +186,17 @@ 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
189struct btrfs_balance_args;
190struct btrfs_balance_control {
191 struct btrfs_fs_info *fs_info;
192
193 struct btrfs_balance_args data;
194 struct btrfs_balance_args meta;
195 struct btrfs_balance_args sys;
196
197 u64 flags;
198};
199
189int btrfs_account_dev_extents_size(struct btrfs_device *device, u64 start, 200int btrfs_account_dev_extents_size(struct btrfs_device *device, u64 start,
190 u64 end, u64 *length); 201 u64 end, u64 *length);
191 202
@@ -228,7 +239,8 @@ struct btrfs_device *btrfs_find_device(struct btrfs_root *root, u64 devid,
228 u8 *uuid, u8 *fsid); 239 u8 *uuid, u8 *fsid);
229int btrfs_shrink_device(struct btrfs_device *device, u64 new_size); 240int btrfs_shrink_device(struct btrfs_device *device, u64 new_size);
230int btrfs_init_new_device(struct btrfs_root *root, char *path); 241int btrfs_init_new_device(struct btrfs_root *root, char *path);
231int btrfs_balance(struct btrfs_root *dev_root); 242int btrfs_balance(struct btrfs_balance_control *bctl,
243 struct btrfs_ioctl_balance_args *bargs);
232int btrfs_chunk_readonly(struct btrfs_root *root, u64 chunk_offset); 244int btrfs_chunk_readonly(struct btrfs_root *root, u64 chunk_offset);
233int find_free_dev_extent(struct btrfs_trans_handle *trans, 245int find_free_dev_extent(struct btrfs_trans_handle *trans,
234 struct btrfs_device *device, u64 num_bytes, 246 struct btrfs_device *device, u64 num_bytes,