aboutsummaryrefslogtreecommitdiffstats
path: root/ioctl.h
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2015-10-22 10:19:38 +0200
committerDavid Sterba <dsterba@suse.com>2016-01-12 15:01:04 +0100
commit40db5cd7ffcbc4b58d6c82e9ddba01f7e26152ca (patch)
tree5f2b486ae544e16dd9678429f25746234554d09c /ioctl.h
parent0826a8ddb90e577c5c359d8bca2571f167029f7e (diff)
downloadbtrfs-progs-40db5cd7ffcbc4b58d6c82e9ddba01f7e26152ca.tar.gz
btrfs-progs-40db5cd7ffcbc4b58d6c82e9ddba01f7e26152ca.tar.xz
btrfs-progs-40db5cd7ffcbc4b58d6c82e9ddba01f7e26152ca.zip
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 <dsterba@suse.com>
Diffstat (limited to 'ioctl.h')
-rw-r--r--ioctl.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/ioctl.h b/ioctl.h
index 0df2444..771da23 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;