From 40db5cd7ffcbc4b58d6c82e9ddba01f7e26152ca Mon Sep 17 00:00:00 2001 From: David Sterba Date: Thu, 22 Oct 2015 10:19:38 +0200 Subject: btrfs-progs: extend balance args to take min/max usage filter Add the overlapping usage and [usage_min, usage_max] members to the balance args. The min/max values are interpreted iff the corresponding flag BTRFS_BALANCE_ARGS_USAGE_RANGE is set. The minimum boundary is inclusive, maximum is exclusive: * usage_min <= chunk_usage < usage_max Signed-off-by: David Sterba --- ioctl.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'ioctl.h') diff --git a/ioctl.h b/ioctl.h index 0df2444c..771da231 100644 --- a/ioctl.h +++ b/ioctl.h @@ -216,7 +216,20 @@ struct btrfs_ioctl_feature_flags { */ struct btrfs_balance_args { __u64 profiles; - __u64 usage; + + /* + * usage filter + * BTRFS_BALANCE_ARGS_USAGE with a single value means '0..N' + * BTRFS_BALANCE_ARGS_USAGE_RANGE - range syntax, min..max + */ + union { + __u64 usage; + struct { + __u32 usage_min; + __u32 usage_max; + }; + }; + __u64 devid; __u64 pstart; __u64 pend; -- cgit v1.2.3