/linux-4.1.27/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.1.27/drivers/staging/lustre/lustre/lov/ |
H A D | lov_obd.c | 1606 * \param fiemap fiemap request header 1612 static u64 fiemap_calc_fm_end_offset(struct ll_user_fiemap *fiemap, fiemap_calc_fm_end_offset() argument 1616 u64 local_end = fiemap->fm_extents[0].fe_logical; fiemap_calc_fm_end_offset() 1621 if (fiemap->fm_extent_count == 0 || fiemap_calc_fm_end_offset() 1622 fiemap->fm_extents[0].fe_logical == 0) fiemap_calc_fm_end_offset() 1632 if (oinfo->loi_ost_idx == fiemap->fm_extents[0].fe_device) { fiemap_calc_fm_end_offset() 1702 * \param fiemap fiemap request header 1703 * \param lcl_fm_ext array of local fiemap extents to be copied 1709 static void fiemap_prepare_and_copy_exts(struct ll_user_fiemap *fiemap, fiemap_prepare_and_copy_exts() argument 1723 to = (char *)fiemap + fiemap_count_to_size(current_extent); fiemap_prepare_and_copy_exts() 1736 struct ll_user_fiemap *fiemap = val; lov_fiemap() local 1756 if (fiemap_count_to_size(fm_key->fiemap.fm_extent_count) < buffer_size) lov_fiemap() 1757 buffer_size = fiemap_count_to_size(fm_key->fiemap.fm_extent_count); lov_fiemap() 1768 memcpy(fiemap, &fm_key->fiemap, sizeof(*fiemap)); lov_fiemap() 1769 fm_start = fiemap->fm_start; lov_fiemap() 1770 fm_length = fiemap->fm_length; lov_fiemap() 1782 fm_end_offset = fiemap_calc_fm_end_offset(fiemap, lsm, fm_start, lov_fiemap() 1789 if (fiemap_count_to_size(fiemap->fm_extent_count) > *vallen) lov_fiemap() 1790 fiemap->fm_extent_count = fiemap_size_to_count(*vallen); lov_fiemap() 1791 if (fiemap->fm_extent_count == 0) { lov_fiemap() 1846 fiemap->fm_extent_count) lov_fiemap() 1847 count_local = fiemap->fm_extent_count - lov_fiemap() 1856 fm_local->fm_flags = fiemap->fm_flags; lov_fiemap() 1882 memcpy(&fm_key->fiemap, fm_local, sizeof(*fm_local)); lov_fiemap() 1897 fiemap->fm_mapped_extents = 0; lov_fiemap() 1929 fiemap_prepare_and_copy_exts(fiemap, lcl_fm_ext, lov_fiemap() 1936 if (current_extent >= fiemap->fm_extent_count) lov_fiemap() 1948 fiemap->fm_flags |= FIEMAP_FLAG_DEVICE_ORDER; lov_fiemap() 1957 fiemap->fm_extents[current_extent - 1].fe_flags |= lov_fiemap() 1962 fiemap->fm_mapped_extents = current_extent; lov_fiemap()
|
/linux-4.1.27/fs/ext3/ |
H A D | file.c | 77 .fiemap = ext3_fiemap,
|
/linux-4.1.27/fs/ocfs2/ |
H A D | symlink.c | 99 .fiemap = ocfs2_fiemap,
|
H A D | extent_map.c | 29 #include <linux/fiemap.h> 709 * it not only handles the fiemap for inlined files, but also deals
|
H A D | file.c | 2609 .fiemap = ocfs2_fiemap,
|
H A D | namei.c | 2899 .fiemap = ocfs2_fiemap,
|
/linux-4.1.27/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.1.27/fs/ext2/ |
H A D | file.c | 120 .fiemap = ext2_fiemap,
|
H A D | inode.c | 32 #include <linux/fiemap.h>
|
/linux-4.1.27/drivers/staging/lustre/lustre/llite/ |
H A D | file.c | 1677 static int ll_do_fiemap(struct inode *inode, struct ll_user_fiemap *fiemap, ll_do_fiemap() argument 1686 /* Checks for fiemap flags */ ll_do_fiemap() 1687 if (fiemap->fm_flags & ~LUSTRE_FIEMAP_FLAGS_COMPAT) { ll_do_fiemap() 1688 fiemap->fm_flags &= ~LUSTRE_FIEMAP_FLAGS_COMPAT; ll_do_fiemap() 1693 if (fiemap->fm_flags & FIEMAP_FLAG_SYNC) { ll_do_fiemap() 1707 !(fiemap->fm_flags & FIEMAP_FLAG_DEVICE_ORDER)) { ll_do_fiemap() 1725 fiemap->fm_mapped_extents = 0; ll_do_fiemap() 1730 memcpy(&fm_key.fiemap, fiemap, sizeof(*fiemap)); ll_do_fiemap() 1733 fiemap, lsm); ll_do_fiemap() 1794 * required fiemap buffer */ ll_ioctl_fiemap() 1809 /* get the fiemap value */ ll_ioctl_fiemap() 1818 * fiemap call. */ ll_ioctl_fiemap() 3060 struct ll_user_fiemap *fiemap; ll_fiemap() local 3063 num_bytes = sizeof(*fiemap) + (extent_count * ll_fiemap() 3065 OBD_ALLOC_LARGE(fiemap, num_bytes); ll_fiemap() 3067 if (fiemap == NULL) ll_fiemap() 3070 fiemap->fm_flags = fieinfo->fi_flags; ll_fiemap() 3071 fiemap->fm_extent_count = fieinfo->fi_extents_max; ll_fiemap() 3072 fiemap->fm_start = start; ll_fiemap() 3073 fiemap->fm_length = len; ll_fiemap() 3075 memcpy(&fiemap->fm_extents[0], fieinfo->fi_extents_start, ll_fiemap() 3078 rc = ll_do_fiemap(inode, fiemap, num_bytes); ll_fiemap() 3080 fieinfo->fi_flags = fiemap->fm_flags; ll_fiemap() 3081 fieinfo->fi_extents_mapped = fiemap->fm_mapped_extents; ll_fiemap() 3083 memcpy(fieinfo->fi_extents_start, &fiemap->fm_extents[0], ll_fiemap() 3084 fiemap->fm_mapped_extents * ll_fiemap() 3087 OBD_FREE_LARGE(fiemap, num_bytes); ll_fiemap() 3189 .fiemap = ll_fiemap,
|
/linux-4.1.27/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 | 3347 struct ll_user_fiemap fiemap; member in struct:ll_fiemap_info_key 3352 extern void lustre_swab_fiemap(struct ll_user_fiemap *fiemap);
|
/linux-4.1.27/fs/nilfs2/ |
H A D | file.c | 162 .fiemap = nilfs_fiemap,
|
H A D | namei.c | 565 .fiemap = nilfs_fiemap,
|
/linux-4.1.27/drivers/staging/lustre/lustre/ptlrpc/ |
H A D | pack_generic.c | 1989 void lustre_swab_fiemap(struct ll_user_fiemap *fiemap) lustre_swab_fiemap() argument 1993 __swab64s(&fiemap->fm_start); lustre_swab_fiemap() 1994 __swab64s(&fiemap->fm_length); lustre_swab_fiemap() 1995 __swab32s(&fiemap->fm_flags); lustre_swab_fiemap() 1996 __swab32s(&fiemap->fm_mapped_extents); lustre_swab_fiemap() 1997 __swab32s(&fiemap->fm_extent_count); lustre_swab_fiemap() 1998 __swab32s(&fiemap->fm_reserved); lustre_swab_fiemap() 2000 for (i = 0; i < fiemap->fm_mapped_extents; i++) lustre_swab_fiemap() 2001 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 | 3753 LASSERTF((int)offsetof(struct ll_fiemap_info_key, fiemap) == 216, "found %lld\n", lustre_assert_wire_constants() 3754 (long long)(int)offsetof(struct ll_fiemap_info_key, fiemap)); lustre_assert_wire_constants() 3755 LASSERTF((int)sizeof(((struct ll_fiemap_info_key *)0)->fiemap) == 32, "found %lld\n", lustre_assert_wire_constants() 3756 (long long)(int)sizeof(((struct ll_fiemap_info_key *)0)->fiemap)); lustre_assert_wire_constants()
|
/linux-4.1.27/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. 1265 * fiemap, bigallic, and seek_data/hole need to use it. es_do_reclaim_extents()
|
H A D | file.c | 661 .fiemap = ext4_fiemap,
|
H A D | inline.c | 15 #include <linux/fiemap.h>
|
H A D | extents.c | 41 #include <linux/fiemap.h> 5105 /* fiemap flags we can handle specified here */
|
H A D | namei.c | 3907 .fiemap = ext4_fiemap,
|
/linux-4.1.27/fs/gfs2/ |
H A D | inode.c | 20 #include <linux/fiemap.h> 1932 .fiemap = gfs2_fiemap, 1954 .fiemap = gfs2_fiemap, 1971 .fiemap = gfs2_fiemap,
|
/linux-4.1.27/fs/xfs/ |
H A D | xfs_iops.c | 47 #include <linux/fiemap.h> 1015 * Call fiemap helper to fill in user data. 1116 .fiemap = xfs_vn_fiemap,
|
/linux-4.1.27/drivers/staging/lustre/lustre/osc/ |
H A D | osc_request.c | 2800 if (!(fm_key->fiemap.fm_flags & FIEMAP_FLAG_SYNC)) osc_get_info() 2803 policy.l_extent.start = fm_key->fiemap.fm_start & osc_get_info() 2806 if (OBD_OBJECT_EOF - fm_key->fiemap.fm_length <= osc_get_info() 2807 fm_key->fiemap.fm_start + PAGE_CACHE_SIZE - 1) osc_get_info() 2810 policy.l_extent.end = (fm_key->fiemap.fm_start + osc_get_info() 2811 fm_key->fiemap.fm_length + osc_get_info()
|
/linux-4.1.27/fs/f2fs/ |
H A D | data.c | 1219 struct buffer_head *bh_result, int create, bool fiemap) __get_data_block() 1249 if (dn.data_blkaddr == NEW_ADDR && !fiemap) __get_data_block() 1285 if (dn.data_blkaddr == NEW_ADDR && !fiemap) __get_data_block() 1218 __get_data_block(struct inode *inode, sector_t iblock, struct buffer_head *bh_result, int create, bool fiemap) __get_data_block() argument
|
H A D | file.c | 663 .fiemap = f2fs_fiemap,
|
/linux-4.1.27/drivers/staging/lustre/lustre/include/ |
H A D | obd.h | 962 #define KEY_FIEMAP "fiemap"
|
/linux-4.1.27/fs/btrfs/ |
H A D | backref.c | 1211 * callers (such as fiemap) which want to know whether the extent is
|
H A D | extent_io.c | 4353 * helper function for fiemap, which doesn't want to see any holes. 4489 * we return to fiemap always move forward and don't extent_fiemap()
|
H A D | inode.c | 9955 .fiemap = btrfs_fiemap,
|
/linux-4.1.27/include/linux/ |
H A D | fs.h | 24 #include <linux/fiemap.h> 1650 int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start, member in struct:inode_operations
|