diff options
author | Ilya Dryomov <idryomov@gmail.com> | 2012-01-16 20:04:47 (GMT) |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2012-01-16 20:04:47 (GMT) |
commit | f43ffb60fd94e98be02780944e182ade6653b916 (patch) | |
tree | 50cab47a03c223d0641d8fe62805e71f5cffef1a /fs/btrfs/volumes.h | |
parent | c9e9f97bdfb64d06e9520f8e4f37674ac21cc9bc (diff) | |
download | linux-fsl-qoriq-f43ffb60fd94e98be02780944e182ade6653b916.tar.xz |
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 8825823..003e542 100644 --- a/fs/btrfs/volumes.h +++ b/fs/btrfs/volumes.h @@ -186,6 +186,17 @@ struct map_lookup { #define map_lookup_size(n) (sizeof(struct map_lookup) + \ (sizeof(struct btrfs_bio_stripe) * (n))) +/* + * Restriper's general type filter + */ +#define BTRFS_BALANCE_DATA (1ULL << 0) +#define BTRFS_BALANCE_SYSTEM (1ULL << 1) +#define BTRFS_BALANCE_METADATA (1ULL << 2) + +#define BTRFS_BALANCE_TYPE_MASK (BTRFS_BALANCE_DATA | \ + BTRFS_BALANCE_SYSTEM | \ + BTRFS_BALANCE_METADATA) + struct btrfs_balance_args; struct btrfs_balance_control { struct btrfs_fs_info *fs_info; |