summaryrefslogtreecommitdiff
path: root/ioctl.h
diff options
context:
space:
mode:
Diffstat (limited to 'ioctl.h')
-rw-r--r--ioctl.h32
1 files changed, 29 insertions, 3 deletions
diff --git a/ioctl.h b/ioctl.h
index dff015a..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;
@@ -227,8 +240,21 @@ struct btrfs_balance_args {
__u64 flags;
- __u64 limit; /* limit number of processed chunks */
- __u64 unused[7];
+ /*
+ * 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;
+ };
+ };
+ __u32 stripes_min;
+ __u32 stripes_max;
+ __u64 unused[6];
} __attribute__ ((__packed__));
/* report balance progress to userspace */