/fs/ocfs2/ |
D | move_extents.c | 42 struct ocfs2_move_extents *range; member 295 context->range->me_flags &= ~OCFS2_MOVE_EXT_FL_COMPLETE; in ocfs2_defrag_extent() 466 struct ocfs2_move_extents *range) in ocfs2_validate_and_adjust_move_goal() argument 479 range->me_goal = ocfs2_block_to_cluster_start(inode->i_sb, in ocfs2_validate_and_adjust_move_goal() 480 range->me_goal); in ocfs2_validate_and_adjust_move_goal() 485 ret = ocfs2_find_victim_alloc_group(inode, range->me_goal, in ocfs2_validate_and_adjust_move_goal() 498 if (range->me_goal == le64_to_cpu(bg->bg_blkno)) in ocfs2_validate_and_adjust_move_goal() 499 range->me_goal += c_to_b; in ocfs2_validate_and_adjust_move_goal() 505 range->me_len) { in ocfs2_validate_and_adjust_move_goal() 514 range->me_goal); in ocfs2_validate_and_adjust_move_goal() [all …]
|
D | ioctl.c | 906 struct fstrim_range range; in ocfs2_ioctl() local 915 if (copy_from_user(&range, argp, sizeof(range))) in ocfs2_ioctl() 918 range.minlen = max_t(u64, bdev_discard_granularity(sb->s_bdev), in ocfs2_ioctl() 919 range.minlen); in ocfs2_ioctl() 920 ret = ocfs2_trim_fs(sb, &range); in ocfs2_ioctl() 924 if (copy_to_user(argp, &range, sizeof(range))) in ocfs2_ioctl()
|
D | alloc.c | 1790 u32 range; in __ocfs2_find_path() local 1817 range = le32_to_cpu(rec->e_cpos) + in __ocfs2_find_path() 1819 if (cpos >= le32_to_cpu(rec->e_cpos) && cpos < range) in __ocfs2_find_path() 2324 unsigned int range; in ocfs2_leftmost_rec_contains() local 2338 range = le32_to_cpu(rec->e_cpos) + ocfs2_rec_clusters(el, rec); in ocfs2_leftmost_rec_contains() 2339 if (cpos >= le32_to_cpu(rec->e_cpos) && cpos < range) in ocfs2_leftmost_rec_contains() 2529 u32 range; in ocfs2_update_edge_lengths() local 2545 range = le32_to_cpu(rec->e_cpos) + ocfs2_rec_clusters(el, rec); in ocfs2_update_edge_lengths() 2552 rec->e_int_clusters = cpu_to_le32(range); in ocfs2_update_edge_lengths() 3864 unsigned int range; in ocfs2_insert_at_leaf() local [all …]
|
/fs/xfs/ |
D | xfs_discard.c | 157 struct fstrim_range range; in xfs_ioc_trim() local 175 if (copy_from_user(&range, urange, sizeof(range))) in xfs_ioc_trim() 178 range.minlen = max_t(u64, granularity, range.minlen); in xfs_ioc_trim() 179 minlen = BTOBB(range.minlen); in xfs_ioc_trim() 187 if (range.start >= XFS_FSB_TO_B(mp, mp->m_sb.sb_dblocks) || in xfs_ioc_trim() 188 range.minlen > XFS_FSB_TO_B(mp, mp->m_ag_max_usable) || in xfs_ioc_trim() 189 range.len < mp->m_sb.sb_blocksize) in xfs_ioc_trim() 192 start = BTOBB(range.start); in xfs_ioc_trim() 193 end = start + BTOBBT(range.len) - 1; in xfs_ioc_trim() 214 range.len = XFS_FSB_TO_B(mp, blocks_trimmed); in xfs_ioc_trim() [all …]
|
/fs/ |
D | userfaultfd.c | 129 struct userfaultfd_wake_range *range = key; in userfaultfd_wake_function() local 137 start = range->start; in userfaultfd_wake_function() 138 len = range->len; in userfaultfd_wake_function() 866 struct userfaultfd_wake_range range = { .len = 0, }; in userfaultfd_release() local 919 __wake_up_locked_key(&ctx->fault_pending_wqh, TASK_NORMAL, &range); in userfaultfd_release() 920 __wake_up(&ctx->fault_wqh, TASK_NORMAL, 1, &range); in userfaultfd_release() 1213 struct userfaultfd_wake_range *range) in __wake_userfault() argument 1219 range); in __wake_userfault() 1221 __wake_up(&ctx->fault_wqh, TASK_NORMAL, 1, range); in __wake_userfault() 1226 struct userfaultfd_wake_range *range) in wake_userfault() argument [all …]
|
/fs/jfs/ |
D | ioctl.c | 113 struct fstrim_range range; in jfs_ioctl() local 124 if (copy_from_user(&range, (struct fstrim_range __user *)arg, in jfs_ioctl() 125 sizeof(range))) in jfs_ioctl() 128 range.minlen = max_t(unsigned int, range.minlen, in jfs_ioctl() 131 ret = jfs_ioc_trim(inode, &range); in jfs_ioctl() 135 if (copy_to_user((struct fstrim_range __user *)arg, &range, in jfs_ioctl() 136 sizeof(range))) in jfs_ioctl()
|
D | jfs_discard.c | 65 int jfs_ioc_trim(struct inode *ip, struct fstrim_range *range) in jfs_ioc_trim() argument 80 start = range->start >> sb->s_blocksize_bits; in jfs_ioc_trim() 81 end = start + (range->len >> sb->s_blocksize_bits) - 1; in jfs_ioc_trim() 82 minlen = range->minlen >> sb->s_blocksize_bits; in jfs_ioc_trim() 88 range->len < sb->s_blocksize) in jfs_ioc_trim() 103 range->len = trimmed << sb->s_blocksize_bits; in jfs_ioc_trim()
|
/fs/nfs/ |
D | pnfs.c | 60 const struct pnfs_layout_range *range, 416 struct pnfs_layout_range range = { in nfs4_layout_refresh_old_stateid() local 436 err = pnfs_mark_matching_lsegs_return(lo, &head, &range, 0); in nfs4_layout_refresh_old_stateid() 439 *dst_range = range; in nfs4_layout_refresh_old_stateid() 460 struct pnfs_layout_range range = { in pnfs_mark_layout_stateid_invalid() local 471 pnfs_free_returned_lsegs(lo, lseg_list, &range, 0); in pnfs_mark_layout_stateid_invalid() 505 struct pnfs_layout_range range = { in pnfs_layout_io_set_failed() local 514 pnfs_mark_matching_lsegs_invalid(lo, &head, &range, 0); in pnfs_layout_io_set_failed() 541 const struct pnfs_layout_range *range, in pnfs_init_lseg() argument 550 lseg->pls_range = *range; in pnfs_init_lseg() [all …]
|
/fs/f2fs/ |
D | file.c | 2309 struct fstrim_range range; in f2fs_ioc_fitrim() local 2318 if (copy_from_user(&range, (struct fstrim_range __user *)arg, in f2fs_ioc_fitrim() 2319 sizeof(range))) in f2fs_ioc_fitrim() 2326 range.minlen = max((unsigned int)range.minlen, in f2fs_ioc_fitrim() 2328 ret = f2fs_trim_fs(F2FS_SB(sb), &range); in f2fs_ioc_fitrim() 2333 if (copy_to_user((struct fstrim_range __user *)arg, &range, in f2fs_ioc_fitrim() 2334 sizeof(range))) in f2fs_ioc_fitrim() 2501 static int __f2fs_ioc_gc_range(struct file *filp, struct f2fs_gc_range *range) in __f2fs_ioc_gc_range() argument 2505 .init_gc_type = range->sync ? FG_GC : BG_GC, in __f2fs_ioc_gc_range() 2508 .err_gc_skipped = range->sync, in __f2fs_ioc_gc_range() [all …]
|
/fs/btrfs/ |
D | tree-defrag.c | 235 struct btrfs_ioctl_defrag_range_args range; in __btrfs_run_defrag_inode() local 266 memset(&range, 0, sizeof(range)); in __btrfs_run_defrag_inode() 267 range.len = (u64)-1; in __btrfs_run_defrag_inode() 268 range.start = cur; in __btrfs_run_defrag_inode() 269 range.extent_thresh = defrag->extent_thresh; in __btrfs_run_defrag_inode() 272 ret = btrfs_defrag_file(inode, NULL, &range, defrag->transid, in __btrfs_run_defrag_inode() 280 cur = max(cur + fs_info->sectorsize, range.start); in __btrfs_run_defrag_inode()
|
D | file.c | 2772 struct falloc_range *range = NULL; in add_falloc_range() local 2779 range = list_last_entry(head, struct falloc_range, list); in add_falloc_range() 2780 if (range->start + range->len == start) { in add_falloc_range() 2781 range->len += len; in add_falloc_range() 2786 range = kmalloc(sizeof(*range), GFP_KERNEL); in add_falloc_range() 2787 if (!range) in add_falloc_range() 2789 range->start = start; in add_falloc_range() 2790 range->len = len; in add_falloc_range() 2791 list_add_tail(&range->list, head); in add_falloc_range() 3031 struct falloc_range *range; in btrfs_fallocate() local [all …]
|
D | ioctl.c | 473 struct fstrim_range range; in btrfs_ioctl_fitrim() local 512 if (copy_from_user(&range, arg, sizeof(range))) in btrfs_ioctl_fitrim() 520 if (range.len < fs_info->sb->s_blocksize) in btrfs_ioctl_fitrim() 523 range.minlen = max(range.minlen, minlen); in btrfs_ioctl_fitrim() 524 ret = btrfs_trim_fs(fs_info, &range); in btrfs_ioctl_fitrim() 528 if (copy_to_user(arg, &range, sizeof(range))) in btrfs_ioctl_fitrim() 1804 struct btrfs_ioctl_defrag_range_args *range, in btrfs_defrag_file() argument 1812 bool do_compress = range->flags & BTRFS_DEFRAG_RANGE_COMPRESS; in btrfs_defrag_file() 1816 u32 extent_thresh = range->extent_thresh; in btrfs_defrag_file() 1822 if (range->start >= isize) in btrfs_defrag_file() [all …]
|
/fs/exfat/ |
D | file.c | 323 struct fstrim_range range; in exfat_ioctl_fitrim() local 332 if (copy_from_user(&range, (struct fstrim_range __user *)arg, sizeof(range))) in exfat_ioctl_fitrim() 335 range.minlen = max_t(unsigned int, range.minlen, in exfat_ioctl_fitrim() 338 ret = exfat_trim_fs(inode, &range); in exfat_ioctl_fitrim() 342 if (copy_to_user((struct fstrim_range __user *)arg, &range, sizeof(range))) in exfat_ioctl_fitrim()
|
D | balloc.c | 272 int exfat_trim_fs(struct inode *inode, struct fstrim_range *range) in exfat_trim_fs() argument 280 clu_start = max_t(u64, range->start >> sbi->cluster_size_bits, in exfat_trim_fs() 282 clu_end = clu_start + (range->len >> sbi->cluster_size_bits) - 1; in exfat_trim_fs() 283 trim_minlen = range->minlen >> sbi->cluster_size_bits; in exfat_trim_fs() 285 if (clu_start >= sbi->num_clusters || range->len < sbi->cluster_size) in exfat_trim_fs() 347 range->len = trimmed_total << sbi->cluster_size_bits; in exfat_trim_fs()
|
/fs/nfs/blocklayout/ |
D | blocklayout.c | 650 .mode = lgr->range.iomode, in bl_alloc_lseg() 651 .start = lgr->range.offset >> SECTOR_SHIFT, in bl_alloc_lseg() 652 .inval = lgr->range.offset >> SECTOR_SHIFT, in bl_alloc_lseg() 653 .cowread = lgr->range.offset >> SECTOR_SHIFT, in bl_alloc_lseg() 698 if (lgr->range.offset + lgr->range.length != in bl_alloc_lseg() 745 struct pnfs_layout_range *range) in bl_return_range() argument 748 sector_t offset = range->offset >> SECTOR_SHIFT, end; in bl_return_range() 750 if (range->offset % 8) { in bl_return_range() 752 __func__, range->offset); in bl_return_range() 756 if (range->length != NFS4_MAX_UINT64) { in bl_return_range() [all …]
|
/fs/nilfs2/ |
D | ioctl.c | 1055 struct fstrim_range range; in nilfs_ioctl_trim_fs() local 1064 if (copy_from_user(&range, argp, sizeof(range))) in nilfs_ioctl_trim_fs() 1067 range.minlen = max_t(u64, range.minlen, in nilfs_ioctl_trim_fs() 1071 ret = nilfs_sufile_trim_fs(nilfs->ns_sufile, &range); in nilfs_ioctl_trim_fs() 1077 if (copy_to_user(argp, &range, sizeof(range))) in nilfs_ioctl_trim_fs() 1097 __u64 range[2]; in nilfs_ioctl_set_alloc_range() local 1106 if (copy_from_user(range, argp, sizeof(__u64[2]))) in nilfs_ioctl_set_alloc_range() 1110 if (range[1] > bdev_nr_bytes(inode->i_sb->s_bdev)) in nilfs_ioctl_set_alloc_range() 1115 minseg = range[0] + segbytes - 1; in nilfs_ioctl_set_alloc_range() 1118 if (range[1] < 4096) in nilfs_ioctl_set_alloc_range() [all …]
|
/fs/incfs/ |
D | verity.c | 160 return range(NULL, 0); in incfs_get_verity_digest() 221 return range(ERR_PTR(incfs_hash_alg), 0); in incfs_calc_verity_digest_from_desc() 225 return range((u8 *)hash_alg, 0); in incfs_calc_verity_digest_from_desc() 227 verity_file_digest = range(kzalloc(hash_alg->digest_size, GFP_KERNEL), in incfs_calc_verity_digest_from_desc() 230 return range(ERR_PTR(-ENOMEM), 0); in incfs_calc_verity_digest_from_desc() 248 verity_file_digest = range(ERR_PTR(err), 0); in incfs_calc_verity_digest_from_desc() 289 return range((u8 *)desc, 0); in incfs_calc_verity_digest() 428 struct mem_range hash = range(hash_buf, hash_size); in incfs_add_signature_record() 446 hash_tree = incfs_alloc_mtree(range((u8 *)&sig, sizeof(sig)), in incfs_add_signature_record() 462 range((u8 *)&sig, sizeof(sig)), in incfs_add_signature_record() [all …]
|
D | data_mgmt.c | 737 range(buf, INCFS_DATA_FILE_BLOCK_SIZE), in validate_hash_tree() 738 range(calculated_digest, digest_size)); in validate_hash_tree() 776 range(calculated_digest, digest_size)); in validate_hash_tree() 848 static int copy_one_range(struct incfs_filled_range *range, void __user *buffer, in copy_one_range() argument 855 if (copy_to_user(((char __user *)buffer) + *size_out, range, in copy_one_range() 856 sizeof(*range))) in copy_one_range() 859 *size_out += sizeof(*range); in copy_one_range() 870 struct incfs_filled_range range; in incfs_get_filled_blocks() local 901 range = (struct incfs_filled_range){ in incfs_get_filled_blocks() 906 error = copy_one_range(&range, buffer, size, size_out); in incfs_get_filled_blocks() [all …]
|
D | integrity.c | 79 static bool read_mem_range(u8 **p, u8 *top, struct mem_range *range) in read_mem_range() argument 86 range->len = len; in read_mem_range() 87 range->data = *p; in read_mem_range()
|
D | pseudo_files.c | 220 struct mem_range name = range(file_name, strlen(file_name)); in validate_name() 283 return range(NULL, 0); in incfs_copy_signature_info_from_user() 286 return range(ERR_PTR(-EFAULT), 0); in incfs_copy_signature_info_from_user() 290 return range(ERR_PTR(-ENOMEM), 0); in incfs_copy_signature_info_from_user() 294 return range(ERR_PTR(-EFAULT), 0); in incfs_copy_signature_info_from_user() 297 return range(result, size); in incfs_copy_signature_info_from_user() 659 range(attr_value, args.file_attr_len), in ioctl_create_file() 1359 range((u8 *)dentry->d_name.name, dentry->d_name.len); in dir_lookup_pseudo_files()
|
/fs/nfs/flexfilelayout/ |
D | flexfilelayoutdev.c | 422 const struct pnfs_layout_range *range, in ff_layout_get_ds_cred() argument 428 cred = ff_layout_get_mirror_cred(mirror, range->iomode); in ff_layout_get_ds_cred() 509 const struct pnfs_layout_range *range, in do_layout_fetch_ds_ioerr() argument 522 range->offset, in do_layout_fetch_ds_ioerr() 523 pnfs_end_offset(range->offset, range->length))) in do_layout_fetch_ds_ioerr() 536 const struct pnfs_layout_range *range, in ff_layout_fetch_ds_ioerr() argument 542 ret = do_layout_fetch_ds_ioerr(lo, range, head, maxnum); in ff_layout_fetch_ds_ioerr() 546 do_layout_fetch_ds_ioerr(lo, range, &discard, -1); in ff_layout_fetch_ds_ioerr()
|
/fs/hpfs/ |
D | super.c | 208 struct fstrim_range range; in hpfs_ioctl() local 213 if (copy_from_user(&range, (struct fstrim_range __user *)arg, sizeof(range))) in hpfs_ioctl() 215 …r = hpfs_trim_fs(file_inode(file)->i_sb, range.start >> 9, (range.start + range.len) >> 9, (range.… in hpfs_ioctl() 218 range.len = (u64)n_trimmed << 9; in hpfs_ioctl() 219 if (copy_to_user((struct fstrim_range __user *)arg, &range, sizeof(range))) in hpfs_ioctl()
|
/fs/fat/ |
D | file.c | 130 struct fstrim_range range; in fat_ioctl_fitrim() local 140 if (copy_from_user(&range, user_range, sizeof(range))) in fat_ioctl_fitrim() 143 range.minlen = max_t(unsigned int, range.minlen, in fat_ioctl_fitrim() 146 err = fat_trim_fs(inode, &range); in fat_ioctl_fitrim() 150 if (copy_to_user(user_range, &range, sizeof(range))) in fat_ioctl_fitrim()
|
/fs/fuse/ |
D | dax.c | 1211 struct fuse_dax_mapping *range, *temp; in fuse_free_dax_mem_ranges() local 1214 list_for_each_entry_safe(range, temp, mem_list, list) { in fuse_free_dax_mem_ranges() 1215 list_del(&range->list); in fuse_free_dax_mem_ranges() 1216 if (!list_empty(&range->busy_list)) in fuse_free_dax_mem_ranges() 1217 list_del(&range->busy_list); in fuse_free_dax_mem_ranges() 1218 kfree(range); in fuse_free_dax_mem_ranges() 1234 struct fuse_dax_mapping *range; in fuse_dax_mem_range_init() local 1258 range = kzalloc(sizeof(struct fuse_dax_mapping), GFP_KERNEL); in fuse_dax_mem_range_init() 1260 if (!range) in fuse_dax_mem_range_init() 1267 range->window_offset = i * FUSE_DAX_SZ; in fuse_dax_mem_range_init() [all …]
|
/fs/ntfs3/ |
D | file.c | 24 struct fstrim_range range; in ntfs_ioctl_fitrim() local 34 if (copy_from_user(&range, user_range, sizeof(range))) in ntfs_ioctl_fitrim() 37 range.minlen = max_t(u32, range.minlen, in ntfs_ioctl_fitrim() 40 err = ntfs_trim_fs(sbi, &range); in ntfs_ioctl_fitrim() 44 if (copy_to_user(user_range, &range, sizeof(range))) in ntfs_ioctl_fitrim()
|