diff options
author | David Sterba <dsterba@suse.com> | 2015-10-20 19:22:13 +0300 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2015-10-27 05:38:30 +0300 |
commit | bc3094673f22d00794a8606200788e411b4ec80d (patch) | |
tree | a90e4834e26e4e69339a100d1489bcc3159e06d8 /fs/btrfs/ctree.h | |
parent | dee32d0ac3719ef8d640efaf0884111df444730f (diff) | |
download | linux-bc3094673f22d00794a8606200788e411b4ec80d.tar.xz |
btrfs: extend balance filter usage to take minimum and maximum
Similar to the 'limit' filter, we can enhance the 'usage' filter to
accept a range. The change is backward compatible, the range is applied
only in connection with the BTRFS_BALANCE_ARGS_USAGE_RANGE flag.
We don't have a usecase yet, the current syntax has been sufficient. The
enhancement should provide parity with other range-like filters.
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r-- | fs/btrfs/ctree.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 8ccbf4317a4a..4001585ec434 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -823,8 +823,18 @@ struct btrfs_disk_balance_args { */ __le64 profiles; - /* usage filter */ - __le64 usage; + /* + * usage filter + * BTRFS_BALANCE_ARGS_USAGE with a single value means '0..N' + * BTRFS_BALANCE_ARGS_USAGE_RANGE - range syntax, min..max + */ + union { + __le64 usage; + struct { + __le32 usage_min; + __le32 usage_max; + }; + }; /* devid filter */ __le64 devid; |