summaryrefslogtreecommitdiff
path: root/ioctl.h
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2015-10-12 00:34:58 +0200
committerDavid Sterba <dsterba@suse.com>2016-01-12 15:01:03 +0100
commit45e9bf809816e9992c288af68f72f01e2329c18d (patch)
treea793dc5fd0c1d783bf093e28e3b43bc23879ae24 /ioctl.h
parentebb66f20aeee76a776d0d64502a9f85d6e8fb77b (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 'ioctl.h')
-rw-r--r--ioctl.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/ioctl.h b/ioctl.h
index dff015a5..e5cf3230 100644
--- a/ioctl.h
+++ b/ioctl.h
@@ -227,7 +227,18 @@ struct btrfs_balance_args {
__u64 flags;
- __u64 limit; /* limit number of processed chunks */
+ /*
+ * BTRFS_BALANCE_ARGS_LIMIT with value 'limit'
+ * BTRFS_BALANCE_ARGS_LIMIT_RANGE - the extend version can use minimum
+ * and maximum
+ */
+ union {
+ __u64 limit; /* limit number of processed chunks */
+ struct {
+ __u32 limit_min;
+ __u32 limit_max;
+ };
+ };
__u64 unused[7];
} __attribute__ ((__packed__));