diff options
author | David Sterba <dsterba@suse.com> | 2015-10-12 00:34:58 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-01-12 15:01:03 +0100 |
commit | 45e9bf809816e9992c288af68f72f01e2329c18d (patch) | |
tree | a793dc5fd0c1d783bf093e28e3b43bc23879ae24 /cmds-balance.c | |
parent | ebb66f20aeee76a776d0d64502a9f85d6e8fb77b (diff) |
btrfs-progs: extend balance args to take min/max limit filter
Add the overlapping limit and [limit_min, limit_max] members to the
balance args. The min/max values are interpreted iff the corresponding
flag BTRFS_BALANCE_ARGS_LIMIT_RANGE is set.
The minimum and maximum are inclusive.
Note that the values are only 32bit, but this should be enough for the
foreseeable future.
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'cmds-balance.c')
-rw-r--r-- | cmds-balance.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cmds-balance.c b/cmds-balance.c index c5be6b9c..dd1c8571 100644 --- a/cmds-balance.c +++ b/cmds-balance.c @@ -347,6 +347,10 @@ static void dump_balance_args(struct btrfs_balance_args *args) (unsigned long long)args->vend); if (args->flags & BTRFS_BALANCE_ARGS_LIMIT) printf(", limit=%llu", (unsigned long long)args->limit); + if (args->flags & BTRFS_BALANCE_ARGS_LIMIT_RANGE) { + printf(", limit="); + print_range_u32(args->limit_min, args->limit_max); + } printf("\n"); } |