Lines Matching defs:bargs
3429 struct btrfs_balance_args *bargs)
3434 if (bargs->profiles & chunk_type)
3441 struct btrfs_balance_args *bargs)
3452 if (bargs->usage_min == 0)
3456 bargs->usage_min);
3458 if (bargs->usage_max == 0)
3460 else if (bargs->usage_max > 100)
3464 bargs->usage_max);
3474 u64 chunk_offset, struct btrfs_balance_args *bargs)
3483 if (bargs->usage_min == 0)
3485 else if (bargs->usage > 100)
3488 user_thresh = div_factor_fine(cache->length, bargs->usage);
3499 struct btrfs_balance_args *bargs)
3507 if (btrfs_stripe_devid(leaf, stripe) == bargs->devid)
3529 struct btrfs_balance_args *bargs)
3539 if (!(bargs->flags & BTRFS_BALANCE_ARGS_DEVID))
3547 if (btrfs_stripe_devid(leaf, stripe) != bargs->devid)
3554 if (stripe_offset < bargs->pend &&
3555 stripe_offset + stripe_length > bargs->pstart)
3566 struct btrfs_balance_args *bargs)
3568 if (chunk_offset < bargs->vend &&
3569 chunk_offset + btrfs_chunk_length(leaf, chunk) > bargs->vstart)
3578 struct btrfs_balance_args *bargs)
3582 if (bargs->stripes_min <= num_stripes
3583 && num_stripes <= bargs->stripes_max)
3590 struct btrfs_balance_args *bargs)
3592 if (!(bargs->flags & BTRFS_BALANCE_ARGS_CONVERT))
3598 if (bargs->target == chunk_type)
3609 struct btrfs_balance_args *bargs = NULL;
3619 bargs = &bctl->data;
3621 bargs = &bctl->sys;
3623 bargs = &bctl->meta;
3626 if ((bargs->flags & BTRFS_BALANCE_ARGS_PROFILES) &&
3627 chunk_profiles_filter(chunk_type, bargs)) {
3632 if ((bargs->flags & BTRFS_BALANCE_ARGS_USAGE) &&
3633 chunk_usage_filter(fs_info, chunk_offset, bargs)) {
3635 } else if ((bargs->flags & BTRFS_BALANCE_ARGS_USAGE_RANGE) &&
3636 chunk_usage_range_filter(fs_info, chunk_offset, bargs)) {
3641 if ((bargs->flags & BTRFS_BALANCE_ARGS_DEVID) &&
3642 chunk_devid_filter(leaf, chunk, bargs)) {
3647 if ((bargs->flags & BTRFS_BALANCE_ARGS_DRANGE) &&
3648 chunk_drange_filter(leaf, chunk, bargs)) {
3653 if ((bargs->flags & BTRFS_BALANCE_ARGS_VRANGE) &&
3654 chunk_vrange_filter(leaf, chunk, chunk_offset, bargs)) {
3659 if ((bargs->flags & BTRFS_BALANCE_ARGS_STRIPES_RANGE) &&
3660 chunk_stripes_range_filter(leaf, chunk, bargs)) {
3665 if ((bargs->flags & BTRFS_BALANCE_ARGS_SOFT) &&
3666 chunk_soft_convert_filter(chunk_type, bargs)) {
3673 if ((bargs->flags & BTRFS_BALANCE_ARGS_LIMIT)) {
3674 if (bargs->limit == 0)
3677 bargs->limit--;
3678 } else if ((bargs->flags & BTRFS_BALANCE_ARGS_LIMIT_RANGE)) {
3684 if (bargs->limit_max == 0)
3687 bargs->limit_max--;
3917 const struct btrfs_balance_args *bargs,
3920 if (!(bargs->flags & BTRFS_BALANCE_ARGS_CONVERT))
3924 if (alloc_profile_is_valid(bargs->target, 1) &&
3925 (bargs->target & ~allowed) == 0)
3929 type, btrfs_bg_type_to_raid_name(bargs->target));
3934 * Fill @buf with textual description of balance filter flags @bargs, up to
3938 static void describe_balance_args(struct btrfs_balance_args *bargs, char *buf,
3944 u64 flags = bargs->flags;
3979 btrfs_bg_type_to_raid_name(bargs->target));
3985 btrfs_describe_block_groups(bargs->profiles, tmp_buf,
3991 CHECK_APPEND_1ARG("usage=%llu,", bargs->usage);
3995 bargs->usage_min, bargs->usage_max);
3998 CHECK_APPEND_1ARG("devid=%llu,", bargs->devid);
4002 bargs->pstart, bargs->pend);
4006 bargs->vstart, bargs->vend);
4009 CHECK_APPEND_1ARG("limit=%llu,", bargs->limit);
4013 bargs->limit_min, bargs->limit_max);
4017 bargs->stripes_min, bargs->stripes_max);
4092 struct btrfs_ioctl_balance_args *bargs)
4260 if (bargs) {
4261 memset(bargs, 0, sizeof(*bargs));
4262 btrfs_update_ioctl_balance_args(fs_info, bargs);