Lines Matching defs:fiemap
21 #include <linux/fiemap.h>
27 /* So that the fiemap access checks can't overflow on 32 bit machines. */
96 * @fieinfo: Fiemap context passed into ->fiemap
102 * Called from file system ->fiemap callback. Will populate extent
152 * fiemap_prep - check validity of requested flags for fiemap
154 * @fieinfo: Fiemap context passed into ->fiemap
157 * @supported_flags: Set of fiemap flags that the file system understands
159 * This function must be called from each ->fiemap instance to validate the
160 * fiemap request against the file system parameters.
196 static int ioctl_fiemap(struct file *filp, struct fiemap __user *ufiemap)
198 struct fiemap fiemap;
203 if (!inode->i_op->fiemap)
206 if (copy_from_user(&fiemap, ufiemap, sizeof(fiemap)))
209 if (fiemap.fm_extent_count > FIEMAP_MAX_EXTENTS)
212 fieinfo.fi_flags = fiemap.fm_flags;
213 fieinfo.fi_extents_max = fiemap.fm_extent_count;
216 error = inode->i_op->fiemap(inode, &fieinfo, fiemap.fm_start,
217 fiemap.fm_length);
219 fiemap.fm_flags = fieinfo.fi_flags;
220 fiemap.fm_mapped_extents = fieinfo.fi_extents_mapped;
221 if (copy_to_user(ufiemap, &fiemap, sizeof(fiemap)))
278 * @fieinfo: the fiemap info struct that will be passed back to userspace