Lines Matching refs:vol_args
1992 struct btrfs_ioctl_vol_args *vol_args; in btrfs_ioctl_resize() local
2013 vol_args = memdup_user(arg, sizeof(*vol_args)); in btrfs_ioctl_resize()
2014 if (IS_ERR(vol_args)) { in btrfs_ioctl_resize()
2015 ret = PTR_ERR(vol_args); in btrfs_ioctl_resize()
2018 vol_args->name[BTRFS_PATH_NAME_MAX] = '\0'; in btrfs_ioctl_resize()
2019 sizestr = vol_args->name; in btrfs_ioctl_resize()
2030 devstr = vol_args->name; in btrfs_ioctl_resize()
2127 kfree(vol_args); in btrfs_ioctl_resize()
2200 struct btrfs_ioctl_vol_args *vol_args; in btrfs_ioctl_snap_create() local
2206 vol_args = memdup_user(arg, sizeof(*vol_args)); in btrfs_ioctl_snap_create()
2207 if (IS_ERR(vol_args)) in btrfs_ioctl_snap_create()
2208 return PTR_ERR(vol_args); in btrfs_ioctl_snap_create()
2209 vol_args->name[BTRFS_PATH_NAME_MAX] = '\0'; in btrfs_ioctl_snap_create()
2212 vol_args->name, vol_args->fd, subvol, in btrfs_ioctl_snap_create()
2215 kfree(vol_args); in btrfs_ioctl_snap_create()
2222 struct btrfs_ioctl_vol_args_v2 *vol_args; in btrfs_ioctl_snap_create_v2() local
2230 vol_args = memdup_user(arg, sizeof(*vol_args)); in btrfs_ioctl_snap_create_v2()
2231 if (IS_ERR(vol_args)) in btrfs_ioctl_snap_create_v2()
2232 return PTR_ERR(vol_args); in btrfs_ioctl_snap_create_v2()
2233 vol_args->name[BTRFS_SUBVOL_NAME_MAX] = '\0'; in btrfs_ioctl_snap_create_v2()
2235 if (vol_args->flags & ~BTRFS_SUBVOL_CREATE_ARGS_MASK) { in btrfs_ioctl_snap_create_v2()
2240 if (vol_args->flags & BTRFS_SUBVOL_RDONLY) in btrfs_ioctl_snap_create_v2()
2242 if (vol_args->flags & BTRFS_SUBVOL_QGROUP_INHERIT) { in btrfs_ioctl_snap_create_v2()
2245 if (vol_args->size < sizeof(*inherit) || in btrfs_ioctl_snap_create_v2()
2246 vol_args->size > PAGE_SIZE) { in btrfs_ioctl_snap_create_v2()
2250 inherit = memdup_user(vol_args->qgroup_inherit, vol_args->size); in btrfs_ioctl_snap_create_v2()
2265 if (vol_args->size != struct_size(inherit, qgroups, nums)) { in btrfs_ioctl_snap_create_v2()
2272 vol_args->name, vol_args->fd, subvol, in btrfs_ioctl_snap_create_v2()
2279 kfree(vol_args); in btrfs_ioctl_snap_create_v2()
3227 struct btrfs_ioctl_vol_args *vol_args = NULL; in btrfs_ioctl_snap_destroy() local
3337 vol_args = memdup_user(arg, sizeof(*vol_args)); in btrfs_ioctl_snap_destroy()
3338 if (IS_ERR(vol_args)) in btrfs_ioctl_snap_destroy()
3339 return PTR_ERR(vol_args); in btrfs_ioctl_snap_destroy()
3341 vol_args->name[BTRFS_PATH_NAME_MAX] = 0; in btrfs_ioctl_snap_destroy()
3342 subvol_name = vol_args->name; in btrfs_ioctl_snap_destroy()
3441 kfree(vol_args); in btrfs_ioctl_snap_destroy()
3510 struct btrfs_ioctl_vol_args *vol_args; in btrfs_ioctl_add_dev() local
3536 vol_args = memdup_user(arg, sizeof(*vol_args)); in btrfs_ioctl_add_dev()
3537 if (IS_ERR(vol_args)) { in btrfs_ioctl_add_dev()
3538 ret = PTR_ERR(vol_args); in btrfs_ioctl_add_dev()
3542 vol_args->name[BTRFS_PATH_NAME_MAX] = '\0'; in btrfs_ioctl_add_dev()
3543 ret = btrfs_init_new_device(fs_info, vol_args->name); in btrfs_ioctl_add_dev()
3546 btrfs_info(fs_info, "disk added %s", vol_args->name); in btrfs_ioctl_add_dev()
3548 kfree(vol_args); in btrfs_ioctl_add_dev()
3562 struct btrfs_ioctl_vol_args_v2 *vol_args; in btrfs_ioctl_rm_dev_v2() local
3571 vol_args = memdup_user(arg, sizeof(*vol_args)); in btrfs_ioctl_rm_dev_v2()
3572 if (IS_ERR(vol_args)) in btrfs_ioctl_rm_dev_v2()
3573 return PTR_ERR(vol_args); in btrfs_ioctl_rm_dev_v2()
3575 if (vol_args->flags & ~BTRFS_DEVICE_REMOVE_ARGS_MASK) { in btrfs_ioctl_rm_dev_v2()
3580 vol_args->name[BTRFS_SUBVOL_NAME_MAX] = '\0'; in btrfs_ioctl_rm_dev_v2()
3581 if (vol_args->flags & BTRFS_DEVICE_SPEC_BY_ID) { in btrfs_ioctl_rm_dev_v2()
3582 args.devid = vol_args->devid; in btrfs_ioctl_rm_dev_v2()
3583 } else if (!strcmp("cancel", vol_args->name)) { in btrfs_ioctl_rm_dev_v2()
3586 ret = btrfs_get_dev_args_from_path(fs_info, &args, vol_args->name); in btrfs_ioctl_rm_dev_v2()
3606 if (vol_args->flags & BTRFS_DEVICE_SPEC_BY_ID) in btrfs_ioctl_rm_dev_v2()
3608 vol_args->devid); in btrfs_ioctl_rm_dev_v2()
3611 vol_args->name); in btrfs_ioctl_rm_dev_v2()
3619 kfree(vol_args); in btrfs_ioctl_rm_dev_v2()
3628 struct btrfs_ioctl_vol_args *vol_args; in btrfs_ioctl_rm_dev() local
3637 vol_args = memdup_user(arg, sizeof(*vol_args)); in btrfs_ioctl_rm_dev()
3638 if (IS_ERR(vol_args)) in btrfs_ioctl_rm_dev()
3639 return PTR_ERR(vol_args); in btrfs_ioctl_rm_dev()
3641 vol_args->name[BTRFS_PATH_NAME_MAX] = '\0'; in btrfs_ioctl_rm_dev()
3642 if (!strcmp("cancel", vol_args->name)) { in btrfs_ioctl_rm_dev()
3645 ret = btrfs_get_dev_args_from_path(fs_info, &args, vol_args->name); in btrfs_ioctl_rm_dev()
3659 btrfs_info(fs_info, "disk deleted %s", vol_args->name); in btrfs_ioctl_rm_dev()
3668 kfree(vol_args); in btrfs_ioctl_rm_dev()