Lines Matching defs:bargs

3745 				 struct btrfs_balance_args *bargs)
3750 if (bargs->profiles & chunk_type)
3757 struct btrfs_balance_args *bargs)
3768 if (bargs->usage_min == 0)
3771 user_thresh_min = mult_perc(cache->length, bargs->usage_min);
3773 if (bargs->usage_max == 0)
3775 else if (bargs->usage_max > 100)
3778 user_thresh_max = mult_perc(cache->length, bargs->usage_max);
3788 u64 chunk_offset, struct btrfs_balance_args *bargs)
3797 if (bargs->usage_min == 0)
3799 else if (bargs->usage > 100)
3802 user_thresh = mult_perc(cache->length, bargs->usage);
3813 struct btrfs_balance_args *bargs)
3821 if (btrfs_stripe_devid(leaf, stripe) == bargs->devid)
3840 struct btrfs_balance_args *bargs)
3850 if (!(bargs->flags & BTRFS_BALANCE_ARGS_DEVID))
3858 if (btrfs_stripe_devid(leaf, stripe) != bargs->devid)
3865 if (stripe_offset < bargs->pend &&
3866 stripe_offset + stripe_length > bargs->pstart)
3877 struct btrfs_balance_args *bargs)
3879 if (chunk_offset < bargs->vend &&
3880 chunk_offset + btrfs_chunk_length(leaf, chunk) > bargs->vstart)
3889 struct btrfs_balance_args *bargs)
3893 if (bargs->stripes_min <= num_stripes
3894 && num_stripes <= bargs->stripes_max)
3901 struct btrfs_balance_args *bargs)
3903 if (!(bargs->flags & BTRFS_BALANCE_ARGS_CONVERT))
3909 if (bargs->target == chunk_type)
3920 struct btrfs_balance_args *bargs = NULL;
3930 bargs = &bctl->data;
3932 bargs = &bctl->sys;
3934 bargs = &bctl->meta;
3937 if ((bargs->flags & BTRFS_BALANCE_ARGS_PROFILES) &&
3938 chunk_profiles_filter(chunk_type, bargs)) {
3943 if ((bargs->flags & BTRFS_BALANCE_ARGS_USAGE) &&
3944 chunk_usage_filter(fs_info, chunk_offset, bargs)) {
3946 } else if ((bargs->flags & BTRFS_BALANCE_ARGS_USAGE_RANGE) &&
3947 chunk_usage_range_filter(fs_info, chunk_offset, bargs)) {
3952 if ((bargs->flags & BTRFS_BALANCE_ARGS_DEVID) &&
3953 chunk_devid_filter(leaf, chunk, bargs)) {
3958 if ((bargs->flags & BTRFS_BALANCE_ARGS_DRANGE) &&
3959 chunk_drange_filter(leaf, chunk, bargs)) {
3964 if ((bargs->flags & BTRFS_BALANCE_ARGS_VRANGE) &&
3965 chunk_vrange_filter(leaf, chunk, chunk_offset, bargs)) {
3970 if ((bargs->flags & BTRFS_BALANCE_ARGS_STRIPES_RANGE) &&
3971 chunk_stripes_range_filter(leaf, chunk, bargs)) {
3976 if ((bargs->flags & BTRFS_BALANCE_ARGS_SOFT) &&
3977 chunk_soft_convert_filter(chunk_type, bargs)) {
3984 if ((bargs->flags & BTRFS_BALANCE_ARGS_LIMIT)) {
3985 if (bargs->limit == 0)
3988 bargs->limit--;
3989 } else if ((bargs->flags & BTRFS_BALANCE_ARGS_LIMIT_RANGE)) {
3995 if (bargs->limit_max == 0)
3998 bargs->limit_max--;
4221 const struct btrfs_balance_args *bargs,
4224 if (!(bargs->flags & BTRFS_BALANCE_ARGS_CONVERT))
4228 if (alloc_profile_is_valid(bargs->target, 1) &&
4229 (bargs->target & ~allowed) == 0)
4233 type, btrfs_bg_type_to_raid_name(bargs->target));
4238 * Fill @buf with textual description of balance filter flags @bargs, up to
4242 static void describe_balance_args(struct btrfs_balance_args *bargs, char *buf,
4248 u64 flags = bargs->flags;
4283 btrfs_bg_type_to_raid_name(bargs->target));
4289 btrfs_describe_block_groups(bargs->profiles, tmp_buf,
4295 CHECK_APPEND_1ARG("usage=%llu,", bargs->usage);
4299 bargs->usage_min, bargs->usage_max);
4302 CHECK_APPEND_1ARG("devid=%llu,", bargs->devid);
4306 bargs->pstart, bargs->pend);
4310 bargs->vstart, bargs->vend);
4313 CHECK_APPEND_1ARG("limit=%llu,", bargs->limit);
4317 bargs->limit_min, bargs->limit_max);
4321 bargs->stripes_min, bargs->stripes_max);
4396 struct btrfs_ioctl_balance_args *bargs)
4560 if (bargs) {
4561 memset(bargs, 0, sizeof(*bargs));
4562 btrfs_update_ioctl_balance_args(fs_info, bargs);