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 | f43ffb60fd94e98be02780944e182ade6653b916 (patch) | |
tree | 50cab47a03c223d0641d8fe62805e71f5cffef1a /fs/btrfs/volumes.h | |
parent | c9e9f97bdfb64d06e9520f8e4f37674ac21cc9bc (diff) |
Btrfs: add basic infrastructure for selective balancing
This allows to have a separate set of filters for each chunk type
(data,meta,sys). The code however is generic and switch on chunk type
is only done once.
This commit also adds a type filter: it allows to balance for example
meta and system chunks w/o touching data ones.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/btrfs/volumes.h')
-rw-r--r-- | fs/btrfs/volumes.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/fs/btrfs/volumes.h b/fs/btrfs/volumes.h index 882582385283..003e54216069 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 | ||
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 | |||
189 | struct btrfs_balance_args; | 200 | struct btrfs_balance_args; |
190 | struct btrfs_balance_control { | 201 | struct btrfs_balance_control { |
191 | struct btrfs_fs_info *fs_info; | 202 | struct btrfs_fs_info *fs_info; |