/linux-4.4.14/fs/ |
H A D | ioctl.c | 21 /* So that the fiemap access checks can't overflow on 32 bit machines. */ 69 * @fieinfo: Fiemap context passed into ->fiemap 75 * Called from file system ->fiemap callback. Will populate extent 125 * fiemap_check_flags - check validity of requested flags for fiemap 126 * @fieinfo: Fiemap context passed into ->fiemap 127 * @fs_flags: Set of fiemap flags that the file system understands 129 * Called from file system ->fiemap callback. This will compute the 130 * intersection of valid fiemap flags and those that the fs supports. That 175 struct fiemap fiemap; ioctl_fiemap() local 176 struct fiemap __user *ufiemap = (struct fiemap __user *) arg; ioctl_fiemap() 183 if (!inode->i_op->fiemap) ioctl_fiemap() 186 if (copy_from_user(&fiemap, ufiemap, sizeof(fiemap))) ioctl_fiemap() 189 if (fiemap.fm_extent_count > FIEMAP_MAX_EXTENTS) ioctl_fiemap() 192 error = fiemap_check_ranges(sb, fiemap.fm_start, fiemap.fm_length, ioctl_fiemap() 197 fieinfo.fi_flags = fiemap.fm_flags; ioctl_fiemap() 198 fieinfo.fi_extents_max = fiemap.fm_extent_count; ioctl_fiemap() 201 if (fiemap.fm_extent_count != 0 && ioctl_fiemap() 209 error = inode->i_op->fiemap(inode, &fieinfo, fiemap.fm_start, len); ioctl_fiemap() 210 fiemap.fm_flags = fieinfo.fi_flags; ioctl_fiemap() 211 fiemap.fm_mapped_extents = fieinfo.fi_extents_mapped; ioctl_fiemap() 212 if (copy_to_user(ufiemap, &fiemap, sizeof(fiemap))) ioctl_fiemap() 233 * @fieinfo: the fiemap info struct that will be passed back to userspace
|
/linux-4.4.14/drivers/staging/lustre/lustre/lov/ |
H A D | lov_obd.c | 1588 * \param fiemap fiemap request header 1594 static u64 fiemap_calc_fm_end_offset(struct ll_user_fiemap *fiemap, fiemap_calc_fm_end_offset() argument 1598 u64 local_end = fiemap->fm_extents[0].fe_logical; fiemap_calc_fm_end_offset() 1603 if (fiemap->fm_extent_count == 0 || fiemap_calc_fm_end_offset() 1604 fiemap->fm_extents[0].fe_logical == 0) fiemap_calc_fm_end_offset() 1614 if (oinfo->loi_ost_idx == fiemap->fm_extents[0].fe_device) { fiemap_calc_fm_end_offset() 1684 * \param fiemap fiemap request header 1685 * \param lcl_fm_ext array of local fiemap extents to be copied 1691 static void fiemap_prepare_and_copy_exts(struct ll_user_fiemap *fiemap, fiemap_prepare_and_copy_exts() argument 1705 to = (char *)fiemap + fiemap_count_to_size(current_extent); fiemap_prepare_and_copy_exts() 1718 struct ll_user_fiemap *fiemap = val; lov_fiemap() local 1738 if (fiemap_count_to_size(fm_key->fiemap.fm_extent_count) < buffer_size) lov_fiemap() 1739 buffer_size = fiemap_count_to_size(fm_key->fiemap.fm_extent_count); lov_fiemap() 1750 memcpy(fiemap, &fm_key->fiemap, sizeof(*fiemap)); lov_fiemap() 1751 fm_start = fiemap->fm_start; lov_fiemap() 1752 fm_length = fiemap->fm_length; lov_fiemap() 1764 fm_end_offset = fiemap_calc_fm_end_offset(fiemap, lsm, fm_start, lov_fiemap() 1771 if (fiemap_count_to_size(fiemap->fm_extent_count) > *vallen) lov_fiemap() 1772 fiemap->fm_extent_count = fiemap_size_to_count(*vallen); lov_fiemap() 1773 if (fiemap->fm_extent_count == 0) { lov_fiemap() 1828 fiemap->fm_extent_count) lov_fiemap() 1829 count_local = fiemap->fm_extent_count - lov_fiemap() 1838 fm_local->fm_flags = fiemap->fm_flags; lov_fiemap() 1864 memcpy(&fm_key->fiemap, fm_local, sizeof(*fm_local)); lov_fiemap() 1879 fiemap->fm_mapped_extents = 0; lov_fiemap() 1911 fiemap_prepare_and_copy_exts(fiemap, lcl_fm_ext, lov_fiemap() 1918 if (current_extent >= fiemap->fm_extent_count) lov_fiemap() 1930 fiemap->fm_flags |= FIEMAP_FLAG_DEVICE_ORDER; lov_fiemap() 1939 fiemap->fm_extents[current_extent - 1].fe_flags |= lov_fiemap() 1944 fiemap->fm_mapped_extents = current_extent; lov_fiemap()
|
/linux-4.4.14/fs/ocfs2/ |
H A D | symlink.c | 99 .fiemap = ocfs2_fiemap,
|
H A D | extent_map.c | 29 #include <linux/fiemap.h> 711 * it not only handles the fiemap for inlined files, but also deals
|
H A D | file.c | 2594 .fiemap = ocfs2_fiemap,
|
H A D | namei.c | 2920 .fiemap = ocfs2_fiemap,
|
/linux-4.4.14/include/uapi/linux/ |
H A D | fiemap.h | 27 struct fiemap { struct
|
H A D | fs.h | 167 #define FS_IOC_FIEMAP _IOWR('f', 11, struct fiemap)
|
/linux-4.4.14/drivers/staging/lustre/lustre/llite/ |
H A D | file.c | 1668 static int ll_do_fiemap(struct inode *inode, struct ll_user_fiemap *fiemap, ll_do_fiemap() argument 1677 /* Checks for fiemap flags */ ll_do_fiemap() 1678 if (fiemap->fm_flags & ~LUSTRE_FIEMAP_FLAGS_COMPAT) { ll_do_fiemap() 1679 fiemap->fm_flags &= ~LUSTRE_FIEMAP_FLAGS_COMPAT; ll_do_fiemap() 1684 if (fiemap->fm_flags & FIEMAP_FLAG_SYNC) { ll_do_fiemap() 1698 !(fiemap->fm_flags & FIEMAP_FLAG_DEVICE_ORDER)) { ll_do_fiemap() 1716 fiemap->fm_mapped_extents = 0; ll_do_fiemap() 1721 memcpy(&fm_key.fiemap, fiemap, sizeof(*fiemap)); ll_do_fiemap() 1724 fiemap, lsm); ll_do_fiemap() 1785 * required fiemap buffer */ ll_ioctl_fiemap() 1800 /* get the fiemap value */ ll_ioctl_fiemap() 1809 * fiemap call. */ ll_ioctl_fiemap() 3022 struct ll_user_fiemap *fiemap; ll_fiemap() local 3025 num_bytes = sizeof(*fiemap) + (extent_count * ll_fiemap() 3027 fiemap = libcfs_kvzalloc(num_bytes, GFP_NOFS); ll_fiemap() 3029 if (fiemap == NULL) ll_fiemap() 3032 fiemap->fm_flags = fieinfo->fi_flags; ll_fiemap() 3033 fiemap->fm_extent_count = fieinfo->fi_extents_max; ll_fiemap() 3034 fiemap->fm_start = start; ll_fiemap() 3035 fiemap->fm_length = len; ll_fiemap() 3037 memcpy(&fiemap->fm_extents[0], fieinfo->fi_extents_start, ll_fiemap() 3040 rc = ll_do_fiemap(inode, fiemap, num_bytes); ll_fiemap() 3042 fieinfo->fi_flags = fiemap->fm_flags; ll_fiemap() 3043 fieinfo->fi_extents_mapped = fiemap->fm_mapped_extents; ll_fiemap() 3045 memcpy(fieinfo->fi_extents_start, &fiemap->fm_extents[0], ll_fiemap() 3046 fiemap->fm_mapped_extents * ll_fiemap() 3049 kvfree(fiemap); ll_fiemap() 3150 .fiemap = ll_fiemap,
|
/linux-4.4.14/drivers/staging/lustre/lustre/include/lustre/ |
H A D | ll_fiemap.h | 37 * fiemap.h is available in the upstream kernel.
|
H A D | lustre_idl.h | 3324 struct ll_user_fiemap fiemap; member in struct:ll_fiemap_info_key 3329 void lustre_swab_fiemap(struct ll_user_fiemap *fiemap);
|
/linux-4.4.14/fs/nilfs2/ |
H A D | file.c | 162 .fiemap = nilfs_fiemap,
|
H A D | namei.c | 561 .fiemap = nilfs_fiemap,
|
/linux-4.4.14/fs/ext2/ |
H A D | file.c | 204 .fiemap = ext2_fiemap,
|
H A D | inode.c | 33 #include <linux/fiemap.h>
|
/linux-4.4.14/drivers/staging/lustre/lustre/ptlrpc/ |
H A D | pack_generic.c | 1835 void lustre_swab_fiemap(struct ll_user_fiemap *fiemap) lustre_swab_fiemap() argument 1839 __swab64s(&fiemap->fm_start); lustre_swab_fiemap() 1840 __swab64s(&fiemap->fm_length); lustre_swab_fiemap() 1841 __swab32s(&fiemap->fm_flags); lustre_swab_fiemap() 1842 __swab32s(&fiemap->fm_mapped_extents); lustre_swab_fiemap() 1843 __swab32s(&fiemap->fm_extent_count); lustre_swab_fiemap() 1844 __swab32s(&fiemap->fm_reserved); lustre_swab_fiemap() 1846 for (i = 0; i < fiemap->fm_mapped_extents; i++) lustre_swab_fiemap() 1847 lustre_swab_fiemap_extent(&fiemap->fm_extents[i]); lustre_swab_fiemap()
|
H A D | layout.c | 1100 DEFINE_MSGF("fiemap", 0, sizeof(struct ll_fiemap_info_key), 1105 DEFINE_MSGF("fiemap", 0, -1, lustre_swab_fiemap, NULL);
|
H A D | wiretest.c | 3751 LASSERTF((int)offsetof(struct ll_fiemap_info_key, fiemap) == 216, "found %lld\n", lustre_assert_wire_constants() 3752 (long long)(int)offsetof(struct ll_fiemap_info_key, fiemap)); lustre_assert_wire_constants() 3753 LASSERTF((int)sizeof(((struct ll_fiemap_info_key *)0)->fiemap) == 32, "found %lld\n", lustre_assert_wire_constants() 3754 (long long)(int)sizeof(((struct ll_fiemap_info_key *)0)->fiemap)); lustre_assert_wire_constants()
|
/linux-4.4.14/fs/ext4/ |
H A D | extents_status.c | 27 * simplify the implementation of fiemap and bigalloc, and introduce 36 * invalidated. Therefore the implementation of fiemap and bigalloc 53 * reclimed because fiemap, bigalloc, and seek_data/hole need it. 1209 * fiemap, bigallic, and seek_data/hole need to use it. es_do_reclaim_extents()
|
H A D | file.c | 770 .fiemap = ext4_fiemap,
|
H A D | inline.c | 15 #include <linux/fiemap.h>
|
H A D | extents.c | 41 #include <linux/fiemap.h> 5133 /* fiemap flags we can handle specified here */
|
H A D | namei.c | 3852 .fiemap = ext4_fiemap,
|
/linux-4.4.14/fs/xfs/ |
H A D | xfs_iops.c | 46 #include <linux/fiemap.h> 1012 * Call fiemap helper to fill in user data. 1113 .fiemap = xfs_vn_fiemap,
|
/linux-4.4.14/drivers/staging/lustre/lustre/osc/ |
H A D | osc_request.c | 2743 if (!(fm_key->fiemap.fm_flags & FIEMAP_FLAG_SYNC)) osc_get_info() 2746 policy.l_extent.start = fm_key->fiemap.fm_start & osc_get_info() 2749 if (OBD_OBJECT_EOF - fm_key->fiemap.fm_length <= osc_get_info() 2750 fm_key->fiemap.fm_start + PAGE_CACHE_SIZE - 1) osc_get_info() 2753 policy.l_extent.end = (fm_key->fiemap.fm_start + osc_get_info() 2754 fm_key->fiemap.fm_length + osc_get_info()
|
/linux-4.4.14/fs/gfs2/ |
H A D | inode.c | 20 #include <linux/fiemap.h> 2105 .fiemap = gfs2_fiemap, 2127 .fiemap = gfs2_fiemap, 2144 .fiemap = gfs2_fiemap,
|
/linux-4.4.14/fs/f2fs/ |
H A D | data.c | 627 * for fiemap. f2fs_map_blocks() 678 * for fiemap. f2fs_map_blocks()
|
H A D | file.c | 718 .fiemap = f2fs_fiemap,
|
/linux-4.4.14/drivers/staging/lustre/lustre/include/ |
H A D | obd.h | 831 #define KEY_FIEMAP "fiemap"
|
/linux-4.4.14/fs/btrfs/ |
H A D | backref.c | 1259 * callers (such as fiemap) which want to know whether the extent is
|
H A D | extent_io.c | 4425 * helper function for fiemap, which doesn't want to see any holes. 4561 * we return to fiemap always move forward and don't extent_fiemap()
|
H A D | inode.c | 10105 .fiemap = btrfs_fiemap,
|
/linux-4.4.14/include/linux/ |
H A D | fs.h | 23 #include <linux/fiemap.h> 1670 int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start, member in struct:inode_operations
|