Lines Matching defs:bargs

3603 				 struct btrfs_balance_args *bargs)
3608 if (bargs->profiles & chunk_type)
3615 struct btrfs_balance_args *bargs)
3626 if (bargs->usage_min == 0)
3629 user_thresh_min = mult_perc(cache->length, bargs->usage_min);
3631 if (bargs->usage_max == 0)
3633 else if (bargs->usage_max > 100)
3636 user_thresh_max = mult_perc(cache->length, bargs->usage_max);
3646 u64 chunk_offset, struct btrfs_balance_args *bargs)
3655 if (bargs->usage_min == 0)
3657 else if (bargs->usage > 100)
3660 user_thresh = mult_perc(cache->length, bargs->usage);
3671 struct btrfs_balance_args *bargs)
3679 if (btrfs_stripe_devid(leaf, stripe) == bargs->devid)
3698 struct btrfs_balance_args *bargs)
3708 if (!(bargs->flags & BTRFS_BALANCE_ARGS_DEVID))
3716 if (btrfs_stripe_devid(leaf, stripe) != bargs->devid)
3723 if (stripe_offset < bargs->pend &&
3724 stripe_offset + stripe_length > bargs->pstart)
3735 struct btrfs_balance_args *bargs)
3737 if (chunk_offset < bargs->vend &&
3738 chunk_offset + btrfs_chunk_length(leaf, chunk) > bargs->vstart)
3747 struct btrfs_balance_args *bargs)
3751 if (bargs->stripes_min <= num_stripes
3752 && num_stripes <= bargs->stripes_max)
3759 struct btrfs_balance_args *bargs)
3761 if (!(bargs->flags & BTRFS_BALANCE_ARGS_CONVERT))
3767 if (bargs->target == chunk_type)
3778 struct btrfs_balance_args *bargs = NULL;
3788 bargs = &bctl->data;
3790 bargs = &bctl->sys;
3792 bargs = &bctl->meta;
3795 if ((bargs->flags & BTRFS_BALANCE_ARGS_PROFILES) &&
3796 chunk_profiles_filter(chunk_type, bargs)) {
3801 if ((bargs->flags & BTRFS_BALANCE_ARGS_USAGE) &&
3802 chunk_usage_filter(fs_info, chunk_offset, bargs)) {
3804 } else if ((bargs->flags & BTRFS_BALANCE_ARGS_USAGE_RANGE) &&
3805 chunk_usage_range_filter(fs_info, chunk_offset, bargs)) {
3810 if ((bargs->flags & BTRFS_BALANCE_ARGS_DEVID) &&
3811 chunk_devid_filter(leaf, chunk, bargs)) {
3816 if ((bargs->flags & BTRFS_BALANCE_ARGS_DRANGE) &&
3817 chunk_drange_filter(leaf, chunk, bargs)) {
3822 if ((bargs->flags & BTRFS_BALANCE_ARGS_VRANGE) &&
3823 chunk_vrange_filter(leaf, chunk, chunk_offset, bargs)) {
3828 if ((bargs->flags & BTRFS_BALANCE_ARGS_STRIPES_RANGE) &&
3829 chunk_stripes_range_filter(leaf, chunk, bargs)) {
3834 if ((bargs->flags & BTRFS_BALANCE_ARGS_SOFT) &&
3835 chunk_soft_convert_filter(chunk_type, bargs)) {
3842 if ((bargs->flags & BTRFS_BALANCE_ARGS_LIMIT)) {
3843 if (bargs->limit == 0)
3846 bargs->limit--;
3847 } else if ((bargs->flags & BTRFS_BALANCE_ARGS_LIMIT_RANGE)) {
3853 if (bargs->limit_max == 0)
3856 bargs->limit_max--;
4079 const struct btrfs_balance_args *bargs,
4082 if (!(bargs->flags & BTRFS_BALANCE_ARGS_CONVERT))
4086 if (alloc_profile_is_valid(bargs->target, 1) &&
4087 (bargs->target & ~allowed) == 0)
4091 type, btrfs_bg_type_to_raid_name(bargs->target));
4096 * Fill @buf with textual description of balance filter flags @bargs, up to
4100 static void describe_balance_args(struct btrfs_balance_args *bargs, char *buf,
4106 u64 flags = bargs->flags;
4141 btrfs_bg_type_to_raid_name(bargs->target));
4147 btrfs_describe_block_groups(bargs->profiles, tmp_buf,
4153 CHECK_APPEND_1ARG("usage=%llu,", bargs->usage);
4157 bargs->usage_min, bargs->usage_max);
4160 CHECK_APPEND_1ARG("devid=%llu,", bargs->devid);
4164 bargs->pstart, bargs->pend);
4168 bargs->vstart, bargs->vend);
4171 CHECK_APPEND_1ARG("limit=%llu,", bargs->limit);
4175 bargs->limit_min, bargs->limit_max);
4179 bargs->stripes_min, bargs->stripes_max);
4254 struct btrfs_ioctl_balance_args *bargs)
4418 if (bargs) {
4419 memset(bargs, 0, sizeof(*bargs));
4420 btrfs_update_ioctl_balance_args(fs_info, bargs);