Lines Matching refs:bargs
3511 struct btrfs_ioctl_balance_args *bargs) in btrfs_update_ioctl_balance_args() argument
3515 bargs->flags = bctl->flags; in btrfs_update_ioctl_balance_args()
3518 bargs->state |= BTRFS_BALANCE_STATE_RUNNING; in btrfs_update_ioctl_balance_args()
3520 bargs->state |= BTRFS_BALANCE_STATE_PAUSE_REQ; in btrfs_update_ioctl_balance_args()
3522 bargs->state |= BTRFS_BALANCE_STATE_CANCEL_REQ; in btrfs_update_ioctl_balance_args()
3524 memcpy(&bargs->data, &bctl->data, sizeof(bargs->data)); in btrfs_update_ioctl_balance_args()
3525 memcpy(&bargs->meta, &bctl->meta, sizeof(bargs->meta)); in btrfs_update_ioctl_balance_args()
3526 memcpy(&bargs->sys, &bctl->sys, sizeof(bargs->sys)); in btrfs_update_ioctl_balance_args()
3529 memcpy(&bargs->stat, &bctl->stat, sizeof(bargs->stat)); in btrfs_update_ioctl_balance_args()
3603 struct btrfs_ioctl_balance_args *bargs; in btrfs_ioctl_balance() local
3615 bargs = memdup_user(arg, sizeof(*bargs)); in btrfs_ioctl_balance()
3616 if (IS_ERR(bargs)) { in btrfs_ioctl_balance()
3617 ret = PTR_ERR(bargs); in btrfs_ioctl_balance()
3618 bargs = NULL; in btrfs_ioctl_balance()
3628 if (bargs->flags & BTRFS_BALANCE_RESUME) { in btrfs_ioctl_balance()
3643 if (bargs->flags & ~(BTRFS_BALANCE_ARGS_MASK | BTRFS_BALANCE_TYPE_MASK)) { in btrfs_ioctl_balance()
3659 memcpy(&bctl->data, &bargs->data, sizeof(bctl->data)); in btrfs_ioctl_balance()
3660 memcpy(&bctl->meta, &bargs->meta, sizeof(bctl->meta)); in btrfs_ioctl_balance()
3661 memcpy(&bctl->sys, &bargs->sys, sizeof(bctl->sys)); in btrfs_ioctl_balance()
3663 bctl->flags = bargs->flags; in btrfs_ioctl_balance()
3673 ret = btrfs_balance(fs_info, bctl, bargs); in btrfs_ioctl_balance()
3677 if (copy_to_user(arg, bargs, sizeof(*bargs))) in btrfs_ioctl_balance()
3688 kfree(bargs); in btrfs_ioctl_balance()
3710 struct btrfs_ioctl_balance_args *bargs; in btrfs_ioctl_balance_progress() local
3722 bargs = kzalloc(sizeof(*bargs), GFP_KERNEL); in btrfs_ioctl_balance_progress()
3723 if (!bargs) { in btrfs_ioctl_balance_progress()
3728 btrfs_update_ioctl_balance_args(fs_info, bargs); in btrfs_ioctl_balance_progress()
3730 if (copy_to_user(arg, bargs, sizeof(*bargs))) in btrfs_ioctl_balance_progress()
3733 kfree(bargs); in btrfs_ioctl_balance_progress()