bargs            2917 fs/btrfs/ctree.h 			       struct btrfs_ioctl_balance_args *bargs);
bargs            4529 fs/btrfs/ioctl.c 			       struct btrfs_ioctl_balance_args *bargs)
bargs            4533 fs/btrfs/ioctl.c 	bargs->flags = bctl->flags;
bargs            4536 fs/btrfs/ioctl.c 		bargs->state |= BTRFS_BALANCE_STATE_RUNNING;
bargs            4538 fs/btrfs/ioctl.c 		bargs->state |= BTRFS_BALANCE_STATE_PAUSE_REQ;
bargs            4540 fs/btrfs/ioctl.c 		bargs->state |= BTRFS_BALANCE_STATE_CANCEL_REQ;
bargs            4542 fs/btrfs/ioctl.c 	memcpy(&bargs->data, &bctl->data, sizeof(bargs->data));
bargs            4543 fs/btrfs/ioctl.c 	memcpy(&bargs->meta, &bctl->meta, sizeof(bargs->meta));
bargs            4544 fs/btrfs/ioctl.c 	memcpy(&bargs->sys, &bctl->sys, sizeof(bargs->sys));
bargs            4547 fs/btrfs/ioctl.c 	memcpy(&bargs->stat, &bctl->stat, sizeof(bargs->stat));
bargs            4555 fs/btrfs/ioctl.c 	struct btrfs_ioctl_balance_args *bargs;
bargs            4617 fs/btrfs/ioctl.c 		bargs = memdup_user(arg, sizeof(*bargs));
bargs            4618 fs/btrfs/ioctl.c 		if (IS_ERR(bargs)) {
bargs            4619 fs/btrfs/ioctl.c 			ret = PTR_ERR(bargs);
bargs            4623 fs/btrfs/ioctl.c 		if (bargs->flags & BTRFS_BALANCE_RESUME) {
bargs            4637 fs/btrfs/ioctl.c 		bargs = NULL;
bargs            4652 fs/btrfs/ioctl.c 		memcpy(&bctl->data, &bargs->data, sizeof(bctl->data));
bargs            4653 fs/btrfs/ioctl.c 		memcpy(&bctl->meta, &bargs->meta, sizeof(bctl->meta));
bargs            4654 fs/btrfs/ioctl.c 		memcpy(&bctl->sys, &bargs->sys, sizeof(bctl->sys));
bargs            4656 fs/btrfs/ioctl.c 		bctl->flags = bargs->flags;
bargs            4676 fs/btrfs/ioctl.c 	ret = btrfs_balance(fs_info, bctl, bargs);
bargs            4680 fs/btrfs/ioctl.c 		if (copy_to_user(arg, bargs, sizeof(*bargs)))
bargs            4687 fs/btrfs/ioctl.c 	kfree(bargs);
bargs            4715 fs/btrfs/ioctl.c 	struct btrfs_ioctl_balance_args *bargs;
bargs            4727 fs/btrfs/ioctl.c 	bargs = kzalloc(sizeof(*bargs), GFP_KERNEL);
bargs            4728 fs/btrfs/ioctl.c 	if (!bargs) {
bargs            4733 fs/btrfs/ioctl.c 	btrfs_update_ioctl_balance_args(fs_info, bargs);
bargs            4735 fs/btrfs/ioctl.c 	if (copy_to_user(arg, bargs, sizeof(*bargs)))
bargs            4738 fs/btrfs/ioctl.c 	kfree(bargs);
bargs            3419 fs/btrfs/volumes.c 				 struct btrfs_balance_args *bargs)
bargs            3424 fs/btrfs/volumes.c 	if (bargs->profiles & chunk_type)
bargs            3431 fs/btrfs/volumes.c 			      struct btrfs_balance_args *bargs)
bargs            3442 fs/btrfs/volumes.c 	if (bargs->usage_min == 0)
bargs            3446 fs/btrfs/volumes.c 					bargs->usage_min);
bargs            3448 fs/btrfs/volumes.c 	if (bargs->usage_max == 0)
bargs            3450 fs/btrfs/volumes.c 	else if (bargs->usage_max > 100)
bargs            3454 fs/btrfs/volumes.c 					bargs->usage_max);
bargs            3464 fs/btrfs/volumes.c 		u64 chunk_offset, struct btrfs_balance_args *bargs)
bargs            3473 fs/btrfs/volumes.c 	if (bargs->usage_min == 0)
bargs            3475 fs/btrfs/volumes.c 	else if (bargs->usage > 100)
bargs            3479 fs/btrfs/volumes.c 					      bargs->usage);
bargs            3490 fs/btrfs/volumes.c 			      struct btrfs_balance_args *bargs)
bargs            3498 fs/btrfs/volumes.c 		if (btrfs_stripe_devid(leaf, stripe) == bargs->devid)
bargs            3520 fs/btrfs/volumes.c 			       struct btrfs_balance_args *bargs)
bargs            3530 fs/btrfs/volumes.c 	if (!(bargs->flags & BTRFS_BALANCE_ARGS_DEVID))
bargs            3538 fs/btrfs/volumes.c 		if (btrfs_stripe_devid(leaf, stripe) != bargs->devid)
bargs            3545 fs/btrfs/volumes.c 		if (stripe_offset < bargs->pend &&
bargs            3546 fs/btrfs/volumes.c 		    stripe_offset + stripe_length > bargs->pstart)
bargs            3557 fs/btrfs/volumes.c 			       struct btrfs_balance_args *bargs)
bargs            3559 fs/btrfs/volumes.c 	if (chunk_offset < bargs->vend &&
bargs            3560 fs/btrfs/volumes.c 	    chunk_offset + btrfs_chunk_length(leaf, chunk) > bargs->vstart)
bargs            3569 fs/btrfs/volumes.c 			       struct btrfs_balance_args *bargs)
bargs            3573 fs/btrfs/volumes.c 	if (bargs->stripes_min <= num_stripes
bargs            3574 fs/btrfs/volumes.c 			&& num_stripes <= bargs->stripes_max)
bargs            3581 fs/btrfs/volumes.c 				     struct btrfs_balance_args *bargs)
bargs            3583 fs/btrfs/volumes.c 	if (!(bargs->flags & BTRFS_BALANCE_ARGS_CONVERT))
bargs            3589 fs/btrfs/volumes.c 	if (bargs->target == chunk_type)
bargs            3600 fs/btrfs/volumes.c 	struct btrfs_balance_args *bargs = NULL;
bargs            3610 fs/btrfs/volumes.c 		bargs = &bctl->data;
bargs            3612 fs/btrfs/volumes.c 		bargs = &bctl->sys;
bargs            3614 fs/btrfs/volumes.c 		bargs = &bctl->meta;
bargs            3617 fs/btrfs/volumes.c 	if ((bargs->flags & BTRFS_BALANCE_ARGS_PROFILES) &&
bargs            3618 fs/btrfs/volumes.c 	    chunk_profiles_filter(chunk_type, bargs)) {
bargs            3623 fs/btrfs/volumes.c 	if ((bargs->flags & BTRFS_BALANCE_ARGS_USAGE) &&
bargs            3624 fs/btrfs/volumes.c 	    chunk_usage_filter(fs_info, chunk_offset, bargs)) {
bargs            3626 fs/btrfs/volumes.c 	} else if ((bargs->flags & BTRFS_BALANCE_ARGS_USAGE_RANGE) &&
bargs            3627 fs/btrfs/volumes.c 	    chunk_usage_range_filter(fs_info, chunk_offset, bargs)) {
bargs            3632 fs/btrfs/volumes.c 	if ((bargs->flags & BTRFS_BALANCE_ARGS_DEVID) &&
bargs            3633 fs/btrfs/volumes.c 	    chunk_devid_filter(leaf, chunk, bargs)) {
bargs            3638 fs/btrfs/volumes.c 	if ((bargs->flags & BTRFS_BALANCE_ARGS_DRANGE) &&
bargs            3639 fs/btrfs/volumes.c 	    chunk_drange_filter(leaf, chunk, bargs)) {
bargs            3644 fs/btrfs/volumes.c 	if ((bargs->flags & BTRFS_BALANCE_ARGS_VRANGE) &&
bargs            3645 fs/btrfs/volumes.c 	    chunk_vrange_filter(leaf, chunk, chunk_offset, bargs)) {
bargs            3650 fs/btrfs/volumes.c 	if ((bargs->flags & BTRFS_BALANCE_ARGS_STRIPES_RANGE) &&
bargs            3651 fs/btrfs/volumes.c 	    chunk_stripes_range_filter(leaf, chunk, bargs)) {
bargs            3656 fs/btrfs/volumes.c 	if ((bargs->flags & BTRFS_BALANCE_ARGS_SOFT) &&
bargs            3657 fs/btrfs/volumes.c 	    chunk_soft_convert_filter(chunk_type, bargs)) {
bargs            3664 fs/btrfs/volumes.c 	if ((bargs->flags & BTRFS_BALANCE_ARGS_LIMIT)) {
bargs            3665 fs/btrfs/volumes.c 		if (bargs->limit == 0)
bargs            3668 fs/btrfs/volumes.c 			bargs->limit--;
bargs            3669 fs/btrfs/volumes.c 	} else if ((bargs->flags & BTRFS_BALANCE_ARGS_LIMIT_RANGE)) {
bargs            3675 fs/btrfs/volumes.c 		if (bargs->limit_max == 0)
bargs            3678 fs/btrfs/volumes.c 			bargs->limit_max--;
bargs            3922 fs/btrfs/volumes.c static void describe_balance_args(struct btrfs_balance_args *bargs, char *buf,
bargs            3928 fs/btrfs/volumes.c 	u64 flags = bargs->flags;
bargs            3963 fs/btrfs/volumes.c 				  btrfs_bg_type_to_raid_name(bargs->target));
bargs            3969 fs/btrfs/volumes.c 		btrfs_describe_block_groups(bargs->profiles, tmp_buf,
bargs            3975 fs/btrfs/volumes.c 		CHECK_APPEND_1ARG("usage=%llu,", bargs->usage);
bargs            3979 fs/btrfs/volumes.c 				  bargs->usage_min, bargs->usage_max);
bargs            3982 fs/btrfs/volumes.c 		CHECK_APPEND_1ARG("devid=%llu,", bargs->devid);
bargs            3986 fs/btrfs/volumes.c 				  bargs->pstart, bargs->pend);
bargs            3990 fs/btrfs/volumes.c 				  bargs->vstart, bargs->vend);
bargs            3993 fs/btrfs/volumes.c 		CHECK_APPEND_1ARG("limit=%llu,", bargs->limit);
bargs            3997 fs/btrfs/volumes.c 				bargs->limit_min, bargs->limit_max);
bargs            4001 fs/btrfs/volumes.c 				  bargs->stripes_min, bargs->stripes_max);
bargs            4076 fs/btrfs/volumes.c 		  struct btrfs_ioctl_balance_args *bargs)
bargs            4244 fs/btrfs/volumes.c 	if (bargs) {
bargs            4245 fs/btrfs/volumes.c 		memset(bargs, 0, sizeof(*bargs));
bargs            4246 fs/btrfs/volumes.c 		btrfs_update_ioctl_balance_args(fs_info, bargs);
bargs             467 fs/btrfs/volumes.h 		  struct btrfs_ioctl_balance_args *bargs);