From dee32d0ac3719ef8d640efaf0884111df444730f Mon Sep 17 00:00:00 2001 From: Gabríel Arthúr Pétursson Date: Mon, 28 Sep 2015 22:32:41 +0000 Subject: btrfs: add balance filter for stripes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Balance block groups which have the given number of stripes, defined by a range min..max. This is useful to selectively rebalance only chunks that do not span enough devices, applies to RAID0/10/5/6. Signed-off-by: Gabríel Arthúr Pétursson [ renamed bargs members, added to the UAPI, wrote the changelog ] Signed-off-by: David Sterba Signed-off-by: Chris Mason --- include/uapi/linux/btrfs.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'include/uapi/linux/btrfs.h') diff --git a/include/uapi/linux/btrfs.h b/include/uapi/linux/btrfs.h index 11f13108b78b..17a94704b183 100644 --- a/include/uapi/linux/btrfs.h +++ b/include/uapi/linux/btrfs.h @@ -229,7 +229,15 @@ struct btrfs_balance_args { __u32 limit_max; }; }; - __u64 unused[7]; + + /* + * Process chunks that cross stripes_min..stripes_max devices, + * BTRFS_BALANCE_ARGS_STRIPES_RANGE + */ + __le32 stripes_min; + __le32 stripes_max; + + __u64 unused[6]; } __attribute__ ((__packed__)); /* report balance progress to userspace */ -- cgit v1.2.3-59-g8ed1b