Lines Matching refs:fi_args
2854 struct btrfs_ioctl_fs_info_args *fi_args; in btrfs_ioctl_fs_info() local
2860 fi_args = memdup_user(arg, sizeof(*fi_args)); in btrfs_ioctl_fs_info()
2861 if (IS_ERR(fi_args)) in btrfs_ioctl_fs_info()
2862 return PTR_ERR(fi_args); in btrfs_ioctl_fs_info()
2864 flags_in = fi_args->flags; in btrfs_ioctl_fs_info()
2865 memset(fi_args, 0, sizeof(*fi_args)); in btrfs_ioctl_fs_info()
2868 fi_args->num_devices = fs_devices->num_devices; in btrfs_ioctl_fs_info()
2871 if (device->devid > fi_args->max_id) in btrfs_ioctl_fs_info()
2872 fi_args->max_id = device->devid; in btrfs_ioctl_fs_info()
2876 memcpy(&fi_args->fsid, fs_devices->fsid, sizeof(fi_args->fsid)); in btrfs_ioctl_fs_info()
2877 fi_args->nodesize = fs_info->nodesize; in btrfs_ioctl_fs_info()
2878 fi_args->sectorsize = fs_info->sectorsize; in btrfs_ioctl_fs_info()
2879 fi_args->clone_alignment = fs_info->sectorsize; in btrfs_ioctl_fs_info()
2882 fi_args->csum_type = btrfs_super_csum_type(fs_info->super_copy); in btrfs_ioctl_fs_info()
2883 fi_args->csum_size = btrfs_super_csum_size(fs_info->super_copy); in btrfs_ioctl_fs_info()
2884 fi_args->flags |= BTRFS_FS_INFO_FLAG_CSUM_INFO; in btrfs_ioctl_fs_info()
2888 fi_args->generation = btrfs_get_fs_generation(fs_info); in btrfs_ioctl_fs_info()
2889 fi_args->flags |= BTRFS_FS_INFO_FLAG_GENERATION; in btrfs_ioctl_fs_info()
2893 memcpy(&fi_args->metadata_uuid, fs_devices->metadata_uuid, in btrfs_ioctl_fs_info()
2894 sizeof(fi_args->metadata_uuid)); in btrfs_ioctl_fs_info()
2895 fi_args->flags |= BTRFS_FS_INFO_FLAG_METADATA_UUID; in btrfs_ioctl_fs_info()
2898 if (copy_to_user(arg, fi_args, sizeof(*fi_args))) in btrfs_ioctl_fs_info()
2901 kfree(fi_args); in btrfs_ioctl_fs_info()