btrfs: add balance filter for stripes

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 <gabriel@system.is>
[ renamed bargs members, added to the UAPI, wrote the changelog ]
Signed-off-by: David Sterba <dsterba@suse.com>

Signed-off-by: Chris Mason <clm@fb.com>
This commit is contained in:
Gabríel Arthúr Pétursson 2015-09-28 22:32:41 +00:00 committed by Chris Mason
parent 12907fc798
commit dee32d0ac3
4 changed files with 37 additions and 2 deletions

View file

@ -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 */