Lines Matching refs:bargs
3464 struct btrfs_ioctl_balance_args *bargs) in btrfs_update_ioctl_balance_args() argument
3468 bargs->flags = bctl->flags; in btrfs_update_ioctl_balance_args()
3471 bargs->state |= BTRFS_BALANCE_STATE_RUNNING; in btrfs_update_ioctl_balance_args()
3473 bargs->state |= BTRFS_BALANCE_STATE_PAUSE_REQ; in btrfs_update_ioctl_balance_args()
3475 bargs->state |= BTRFS_BALANCE_STATE_CANCEL_REQ; in btrfs_update_ioctl_balance_args()
3477 memcpy(&bargs->data, &bctl->data, sizeof(bargs->data)); in btrfs_update_ioctl_balance_args()
3478 memcpy(&bargs->meta, &bctl->meta, sizeof(bargs->meta)); in btrfs_update_ioctl_balance_args()
3479 memcpy(&bargs->sys, &bctl->sys, sizeof(bargs->sys)); in btrfs_update_ioctl_balance_args()
3482 memcpy(&bargs->stat, &bctl->stat, sizeof(bargs->stat)); in btrfs_update_ioctl_balance_args()
3556 struct btrfs_ioctl_balance_args *bargs; in btrfs_ioctl_balance() local
3568 bargs = memdup_user(arg, sizeof(*bargs)); in btrfs_ioctl_balance()
3569 if (IS_ERR(bargs)) { in btrfs_ioctl_balance()
3570 ret = PTR_ERR(bargs); in btrfs_ioctl_balance()
3571 bargs = NULL; in btrfs_ioctl_balance()
3581 if (bargs->flags & BTRFS_BALANCE_RESUME) { in btrfs_ioctl_balance()
3596 if (bargs->flags & ~(BTRFS_BALANCE_ARGS_MASK | BTRFS_BALANCE_TYPE_MASK)) { in btrfs_ioctl_balance()
3612 memcpy(&bctl->data, &bargs->data, sizeof(bctl->data)); in btrfs_ioctl_balance()
3613 memcpy(&bctl->meta, &bargs->meta, sizeof(bctl->meta)); in btrfs_ioctl_balance()
3614 memcpy(&bctl->sys, &bargs->sys, sizeof(bctl->sys)); in btrfs_ioctl_balance()
3616 bctl->flags = bargs->flags; in btrfs_ioctl_balance()
3626 ret = btrfs_balance(fs_info, bctl, bargs); in btrfs_ioctl_balance()
3630 if (copy_to_user(arg, bargs, sizeof(*bargs))) in btrfs_ioctl_balance()
3641 kfree(bargs); in btrfs_ioctl_balance()
3663 struct btrfs_ioctl_balance_args *bargs; in btrfs_ioctl_balance_progress() local
3675 bargs = kzalloc(sizeof(*bargs), GFP_KERNEL); in btrfs_ioctl_balance_progress()
3676 if (!bargs) { in btrfs_ioctl_balance_progress()
3681 btrfs_update_ioctl_balance_args(fs_info, bargs); in btrfs_ioctl_balance_progress()
3683 if (copy_to_user(arg, bargs, sizeof(*bargs))) in btrfs_ioctl_balance_progress()
3686 kfree(bargs); in btrfs_ioctl_balance_progress()