aboutsummaryrefslogtreecommitdiff
path: root/fs/btrfs/ioctl.c
diff options
context:
space:
mode:
authorIlya Dryomov <idryomov@gmail.com>2012-01-16 22:04:47 +0200
committerIlya Dryomov <idryomov@gmail.com>2012-01-16 22:04:47 +0200
commitf43ffb60fd94e98be02780944e182ade6653b916 (patch)
tree50cab47a03c223d0641d8fe62805e71f5cffef1a /fs/btrfs/ioctl.c
parentc9e9f97bdfb64d06e9520f8e4f37674ac21cc9bc (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/ioctl.c')
-rw-r--r--fs/btrfs/ioctl.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index d838d2cfb94..29b3a94933f 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -3116,6 +3116,9 @@ static long btrfs_ioctl_balance(struct btrfs_root *root, void __user *arg)
memcpy(&bctl->sys, &bargs->sys, sizeof(bctl->sys));
bctl->flags = bargs->flags;
+ } else {
+ /* balance everything - no filters */
+ bctl->flags |= BTRFS_BALANCE_TYPE_MASK;
}
ret = btrfs_balance(bctl, bargs);