diff options
author | Ilya Dryomov <idryomov@gmail.com> | 2012-01-16 15:04:48 -0500 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2012-01-16 15:04:48 -0500 |
commit | e4d8ec0f65b91bfb4984a4927632ded95f9825ad (patch) | |
tree | 4727c977803093ec5cdf93da4fcab34cc8de8ecf /fs/btrfs/volumes.h | |
parent | 70922617b0099f420deceb53d5dc7f4fb30d08d0 (diff) |
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 { | |||
196 | #define BTRFS_BALANCE_TYPE_MASK (BTRFS_BALANCE_DATA | \ | 196 | #define BTRFS_BALANCE_TYPE_MASK (BTRFS_BALANCE_DATA | \ |
197 | BTRFS_BALANCE_SYSTEM | \ | 197 | BTRFS_BALANCE_SYSTEM | \ |
198 | BTRFS_BALANCE_METADATA) | 198 | BTRFS_BALANCE_METADATA) |
199 | |||
200 | #define BTRFS_BALANCE_FORCE (1ULL << 3) | ||
201 | |||
199 | /* | 202 | /* |
200 | * Balance filters | 203 | * Balance filters |
201 | */ | 204 | */ |
@@ -205,6 +208,8 @@ struct map_lookup { | |||
205 | #define BTRFS_BALANCE_ARGS_DRANGE (1ULL << 3) | 208 | #define BTRFS_BALANCE_ARGS_DRANGE (1ULL << 3) |
206 | #define BTRFS_BALANCE_ARGS_VRANGE (1ULL << 4) | 209 | #define BTRFS_BALANCE_ARGS_VRANGE (1ULL << 4) |
207 | 210 | ||
211 | #define BTRFS_BALANCE_ARGS_CONVERT (1ULL << 8) | ||
212 | |||
208 | struct btrfs_balance_args; | 213 | struct btrfs_balance_args; |
209 | struct btrfs_balance_control { | 214 | struct btrfs_balance_control { |
210 | struct btrfs_fs_info *fs_info; | 215 | struct btrfs_fs_info *fs_info; |