Lines Matching defs:fiemap
21 #include <linux/fiemap.h>
30 /* So that the fiemap access checks can't overflow on 32 bit machines. */
99 * @fieinfo: Fiemap context passed into ->fiemap
105 * Called from file system ->fiemap callback. Will populate extent
156 * fiemap_prep - check validity of requested flags for fiemap
158 * @fieinfo: Fiemap context passed into ->fiemap
161 * @supported_flags: Set of fiemap flags that the file system understands
163 * This function must be called from each ->fiemap instance to validate the
164 * fiemap request against the file system parameters.
200 static int ioctl_fiemap(struct file *filp, struct fiemap __user *ufiemap)
202 struct fiemap fiemap;
207 if (!inode->i_op->fiemap)
210 if (copy_from_user(&fiemap, ufiemap, sizeof(fiemap)))
213 if (fiemap.fm_extent_count > FIEMAP_MAX_EXTENTS)
216 fieinfo.fi_flags = fiemap.fm_flags;
217 fieinfo.fi_extents_max = fiemap.fm_extent_count;
220 error = inode->i_op->fiemap(inode, &fieinfo, fiemap.fm_start,
221 fiemap.fm_length);
223 fiemap.fm_flags = fieinfo.fi_flags;
224 fiemap.fm_mapped_extents = fieinfo.fi_extents_mapped;
225 if (copy_to_user(ufiemap, &fiemap, sizeof(fiemap)))