diff options
author | Ilya Dryomov <idryomov@gmail.com> | 2012-01-16 15:04:47 -0500 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2012-01-16 15:04:47 -0500 |
commit | c9e9f97bdfb64d06e9520f8e4f37674ac21cc9bc (patch) | |
tree | 22d695a7a461068c773b327e5c89a045ade5d8a3 /fs/btrfs/ctree.h | |
parent | 10ea00f55a07f8f9536d9112b95108a86f700bab (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/ctree.h')
-rw-r--r-- | fs/btrfs/ctree.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 3f8f11e18b53..c4d98c8df5c5 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h | |||
@@ -934,6 +934,7 @@ struct btrfs_block_group_cache { | |||
934 | struct reloc_control; | 934 | struct reloc_control; |
935 | struct btrfs_device; | 935 | struct btrfs_device; |
936 | struct btrfs_fs_devices; | 936 | struct btrfs_fs_devices; |
937 | struct btrfs_balance_control; | ||
937 | struct btrfs_delayed_root; | 938 | struct btrfs_delayed_root; |
938 | struct btrfs_fs_info { | 939 | struct btrfs_fs_info { |
939 | u8 fsid[BTRFS_FSID_SIZE]; | 940 | u8 fsid[BTRFS_FSID_SIZE]; |
@@ -1159,6 +1160,11 @@ struct btrfs_fs_info { | |||
1159 | u64 avail_metadata_alloc_bits; | 1160 | u64 avail_metadata_alloc_bits; |
1160 | u64 avail_system_alloc_bits; | 1161 | u64 avail_system_alloc_bits; |
1161 | 1162 | ||
1163 | /* restriper state */ | ||
1164 | spinlock_t balance_lock; | ||
1165 | struct mutex balance_mutex; | ||
1166 | struct btrfs_balance_control *balance_ctl; | ||
1167 | |||
1162 | unsigned data_chunk_allocations; | 1168 | unsigned data_chunk_allocations; |
1163 | unsigned metadata_ratio; | 1169 | unsigned metadata_ratio; |
1164 | 1170 | ||