diff options
author | Ilya Dryomov <idryomov@gmail.com> | 2012-01-16 21:04:48 +0100 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2012-01-16 21:04:48 +0100 |
commit | e4d8ec0f65b91bfb4984a4927632ded95f9825ad (patch) | |
tree | 4727c977803093ec5cdf93da4fcab34cc8de8ecf /fs/btrfs/volumes.h | |
parent | Btrfs: do not reduce profile in do_chunk_alloc() (diff) | |
download | linux-e4d8ec0f65b91bfb4984a4927632ded95f9825ad.tar.xz linux-e4d8ec0f65b91bfb4984a4927632ded95f9825ad.zip |
Btrfs: implement online profile changing
Profile changing is done by launching a balance with
BTRFS_BALANCE_CONVERT bits set and target fields of respective
btrfs_balance_args structs initialized. Profile reducing code in this
case will pick restriper's target profile if it's available instead of
doing a blind reduce. If target profile is not yet available it goes
back to a plain reduce.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/btrfs/volumes.h')
-rw-r--r-- | fs/btrfs/volumes.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/btrfs/volumes.h b/fs/btrfs/volumes.h index eac26c359312..79ee9c324562 100644 --- a/fs/btrfs/volumes.h +++ b/fs/btrfs/volumes.h @@ -196,6 +196,9 @@ struct map_lookup { #define BTRFS_BALANCE_TYPE_MASK (BTRFS_BALANCE_DATA | \ BTRFS_BALANCE_SYSTEM | \ BTRFS_BALANCE_METADATA) + +#define BTRFS_BALANCE_FORCE (1ULL << 3) + /* * Balance filters */ @@ -205,6 +208,8 @@ struct map_lookup { #define BTRFS_BALANCE_ARGS_DRANGE (1ULL << 3) #define BTRFS_BALANCE_ARGS_VRANGE (1ULL << 4) +#define BTRFS_BALANCE_ARGS_CONVERT (1ULL << 8) + struct btrfs_balance_args; struct btrfs_balance_control { struct btrfs_fs_info *fs_info; |