Update fiemap patches
[ext4-patch-queue.git] / vfs-fiemap.patch
blobf2433582949e43f590afc8a8176dfed5ba687949
1 vfs: vfs-level fiemap interface
3 From: Mark Fasheh <mfasheh@suse.com>
5 Basic vfs-level fiemap infrastructure, which sets up a new ->fiemap
6 inode operation.
8 Userspace can get extent information on a file via fiemap ioctl. As input,
9 the fiemap ioctl takes a struct fiemap which includes an array of struct
10 fiemap_extent (fm_extents). Size of the extent array is passed as
11 fm_extent_count and number of extents returned will be written into
12 fm_mapped_extents. Offset and length fields on the fiemap structure
13 (fm_start, fm_length) describe a logical range which will be searched for
14 extents. All extents returned will at least partially contain this range.
15 The actual extent offsets and ranges returned will be unmodified from their
16 offset and range on-disk.
18 The fiemap ioctl returns '0' on success. On error, -1 is returned and errno
19 is set. If errno is equal to EBADR, then fm_flags will contain those flags
20 which were passed in which the kernel did not understand. On all other
21 errors, the contents of fm_extents is undefined.
23 As fiemap evolved, there have been many authors of the vfs patch. As far as
24 I can tell, the list includes:
25 Kalpak Shah <kalpak.shah@sun.com>
26 Andreas Dilger <adilger@sun.com>
27 Eric Sandeen <sandeen@redhat.com>
28 Mark Fasheh <mfasheh@suse.com>
30 Signed-off-by: Mark Fasheh <mfasheh@suse.com>
31 ---
32 Documentation/filesystems/fiemap.txt | 216 ++++++++++++++++++++++++++++++++++
33 fs/ioctl.c | 154 ++++++++++++++++++++++++
34 include/linux/fiemap.h | 62 ++++++++++
35 include/linux/fs.h | 18 +++
36 4 files changed, 450 insertions(+), 0 deletions(-)
37 create mode 100644 Documentation/filesystems/fiemap.txt
38 create mode 100644 include/linux/fiemap.h
40 diff --git a/Documentation/filesystems/fiemap.txt b/Documentation/filesystems/fiemap.txt
41 new file mode 100644
42 index 0000000..5e95e8f
43 --- /dev/null
44 +++ b/Documentation/filesystems/fiemap.txt
45 @@ -0,0 +1,216 @@
46 +============
47 +Fiemap Ioctl
48 +============
50 +The fiemap ioctl is an efficient method for userspace to get file
51 +extent mappings. Instead of block-by-block mapping (such as bmap), fiemap
52 +returns a list of extents.
55 +Request Basics
56 +--------------
58 +A fiemap request is encoded within struct fiemap:
60 +struct fiemap {
61 + __u64 fm_start; /* logical offset (inclusive) at
62 + * which to start mapping (in) */
63 + __u64 fm_length; /* logical length of mapping which
64 + * userspace cares about (in) */
65 + __u32 fm_flags; /* FIEMAP_FLAG_* flags for request (in/out) */
66 + __u32 fm_mapped_extents; /* number of extents that were
67 + * mapped (out) */
68 + __u32 fm_extent_count; /* size of fm_extents array (in) */
69 + __u32 fm_reserved;
70 + struct fiemap_extent fm_extents[0]; /* array of mapped extents (out) */
71 +};
74 +fm_start, and fm_length specify the logical range within the file
75 +which the process would like mappings for. Extents returned mirror
76 +those on disk - that is, the logical offset of the 1st returned extent
77 +may start before fm_start, and the range covered by the last returned
78 +extent may end after fm_length. All offsets and lengths are in bytes.
80 +Certain flags to modify the way in which mappings are looked up can be
81 +set in fm_flags. If the kernel doesn't understand some particular
82 +flags, it will return EBADR and the contents of fm_flags will contain
83 +the set of flags which caused the error. If the kernel is compatible
84 +with all flags passed, the contents of fm_flags will be unmodified.
85 +It is up to userspace to determine whether rejection of a particular
86 +flag is fatal to it's operation. This scheme is intended to allow the
87 +fiemap interface to grow in the future but without losing
88 +compatibility with old software.
90 +fm_extent_count specifies the number of elements in the fm_extents[] array
91 +that can be used to return extents. If fm_extent_count is zero, then the
92 +fm_extents[] array is ignored (no extents will be returned), and the
93 +fm_mapped_extents count will hold the number of extents needed in
94 +fm_extents[] to hold the file's current mapping. Note that there is
95 +nothing to prevent the file from changing between calls to FIEMAP.
97 +Currently, there are three flags which can be set in fm_flags:
99 +* FIEMAP_FLAG_SYNC
100 +If this flag is set, the kernel will sync the file before mapping extents.
102 +* FIEMAP_FLAG_XATTR
103 +If this flag is set, the extents returned will describe the inodes
104 +extended attribute lookup tree, instead of it's data tree.
107 +Extent Mapping
108 +--------------
110 +Extent information is returned within the embedded fm_extents array
111 +which userspace must allocate along with the fiemap structure. The
112 +number of elements in the fiemap_extents[] array should be passed via
113 +fm_extent_count. The number of extents mapped by kernel will be
114 +returned via fm_mapped_extents. If the number of fiemap_extents
115 +allocated is less than would be required to map the requested range,
116 +the maximum number of extents that can be mapped in the fm_extent[]
117 +array will be returned and fm_mapped_extents will be equal to
118 +fm_extent_count. In that case, the last extent in the array will not
119 +complete the requested range and will not have the FIEMAP_EXTENT_LAST
120 +flag set (see the next section on extent flags).
122 +Each extent is described by a single fiemap_extent structure as
123 +returned in fm_extents.
125 +struct fiemap_extent {
126 + __u64 fe_logical; /* logical offset in bytes for the start of
127 + * the extent */
128 + __u64 fe_physical; /* physical offset in bytes for the start
129 + * of the extent */
130 + __u64 fe_length; /* length in bytes for the extent */
131 + __u32 fe_flags; /* FIEMAP_EXTENT_* flags for this extent */
132 + __u32 fe_reserved;
135 +All offsets and lengths are in bytes and mirror those on disk. It is valid
136 +for an extents logical offset to start before the request or it's logical
137 +length to extend past the request. Unless FIEMAP_EXTENT_NOT_ALIGNED is
138 +returned, fe_logical, fe_physical, and fe_length will be aligned to the
139 +block size of the file system. With the exception of extents flagged as
140 +FIEMAP_EXTENT_MERGED, adjacent extents will not be merged.
142 +The fe_flags field contains flags which describe the extent returned.
143 +A special flag, FIEMAP_EXTENT_LAST is always set on the last extent in
144 +the file so that the process making fiemap calls can determine when no
145 +more extents are available, without having to call the ioctl again.
147 +Some flags are intentionally vague and will always be set in the
148 +presence of other more specific flags. This way a program looking for
149 +a general property does not have to know all existing and future flags
150 +which imply that property.
152 +For example, if FIEMAP_EXTENT_DATA_INLINE or FIEMAP_EXTENT_DATA_TAIL
153 +are set, FIEMAP_EXTENT_NOT_ALIGNED will also be set. A program looking
154 +for inline or tail-packed data can key on the specific flag. Software
155 +which simply cares not to try operating on non-aligned extents
156 +however, can just key on FIEMAP_EXTENT_NOT_ALIGNED, and not have to
157 +worry about all present and future flags which might imply unaligned
158 +data. Note that the opposite is not true - it would be valid for
159 +FIEMAP_EXTENT_NOT_ALIGNED to appear alone.
161 +* FIEMAP_EXTENT_LAST
162 +This is the last extent in the file. A mapping attempt past this
163 +extent will return nothing.
165 +* FIEMAP_EXTENT_UNKNOWN
166 +The location of this extent is currently unknown. This may indicate
167 +the data is stored on an inaccessible volume or that no storage has
168 +been allocated for the file yet.
170 +* FIEMAP_EXTENT_DELALLOC
171 + - This will also set FIEMAP_EXTENT_UNKNOWN.
172 +Delayed allocation - while there is data for this extent, it's
173 +physical location has not been allocated yet.
175 +* FIEMAP_EXTENT_NO_BYPASS
176 +Direct access to the data in this extent is illegal or will have
177 +undefined results.
179 +* FIEMAP_EXTENT_DATA_ENCRYPTED
180 + - This will also set FIEMAP_EXTENT_NO_BYPASS
181 +The data in this extent has been encrypted by the file system.
183 +* FIEMAP_EXTENT_NOT_ALIGNED
184 +Extent offsets and length are not guaranteed to be block aligned.
186 +* FIEMAP_EXTENT_DATA_INLINE
187 + This will also set FIEMAP_EXTENT_NOT_ALIGNED
188 +Data is located within a meta data block.
190 +* FIEMAP_EXTENT_DATA_TAIL
191 + This will also set FIEMAP_EXTENT_NOT_ALIGNED
192 +Data is packed into a block with data from other files.
194 +* FIEMAP_EXTENT_UNWRITTEN
195 +Unwritten extent - the extent is allocated but it's data has not been
196 +initialized. This indicates the extent's data will be all zero if read
197 +through the filesystem but the contents are undefined if read directly from
198 +the device.
200 +* FIEMAP_EXTENT_MERGED
201 +This will be set when a file does not support extents, i.e., it uses a block
202 +based addressing scheme. Since returning an extent for each block back to
203 +userspace would be highly inefficient, the kernel will try to merge most
204 +adjacent blocks into 'extents'.
207 +VFS -> File System Implementation
208 +---------------------------------
210 +File systems wishing to support fiemap must implement a ->fiemap callback on
211 +their inode_operations structure. The fs ->fiemap call is responsible for
212 +defining it's set of supported fiemap flags, and calling a helper function on
213 +each discovered extent:
215 +struct inode_operations {
216 + ...
218 + int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start,
219 + u64 len);
221 +->fiemap is passed struct fiemap_extent_info which describes the
222 +fiemap request:
224 +struct fiemap_extent_info {
225 + unsigned int fi_flags; /* Flags as passed from user */
226 + unsigned int fi_extents_mapped; /* Number of mapped extents */
227 + unsigned int fi_extents_max; /* Size of fiemap_extent array */
228 + struct fiemap_extent *fi_extents_start; /* Start of fiemap_extent array */
231 +It is intended that the file system should not need to access any of this
232 +structure directly.
235 +Flag checking should be done at the beginning of the ->fiemap callback via the
236 +fiemap_check_flags() helper:
238 +int fiemap_check_flags(struct fiemap_extent_info *fieinfo, u32 fs_flags);
240 +The struct fieinfo should be passed in as recieved from ioctl_fiemap(). The
241 +set of fiemap flags which the fs understands should be passed via fs_flags. If
242 +fiemap_check_flags finds invalid user flags, it will place the bad values in
243 +fieinfo->fi_flags and return -EBADR. If the file system gets -EBADR, from
244 +fiemap_check_flags(), it should immediately exit, returning that error back to
245 +ioctl_fiemap().
248 +For each extent in the request range, the file system should call
249 +the helper function, fiemap_fill_next_extent():
251 +int fiemap_fill_next_extent(struct fiemap_extent_info *info, u64 logical,
252 + u64 phys, u64 len, u32 flags, u32 dev);
254 +fiemap_fill_next_extent() will use the passed values to populate the
255 +next free extent in the fm_extents array. 'General' extent flags will
256 +automatically be set from specific flags on behalf of the calling file
257 +system so that the userspace API is not broken.
259 +fiemap_fill_next_extent() returns 0 on success, and 1 when the
260 +user-supplied fm_extents array is full. If an error is encountered
261 +while copying the extent to user memory, -EFAULT will be returned.
262 diff --git a/fs/ioctl.c b/fs/ioctl.c
263 index 7db32b3..274625a 100644
264 --- a/fs/ioctl.c
265 +++ b/fs/ioctl.c
266 @@ -16,6 +16,9 @@
268 #include <asm/ioctls.h>
270 +/* So that the fiemap access checks can't overflow on 32 bit machines. */
271 +#define FIEMAP_MAX_EXTENTS (UINT_MAX / sizeof(struct fiemap_extent))
274 * vfs_ioctl - call filesystem specific ioctl methods
275 * @filp: open file to invoke ioctl method on
276 @@ -71,6 +74,155 @@ static int ioctl_fibmap(struct file *filp, int __user *p)
277 return put_user(res, p);
280 +/**
281 + * fiemap_fill_next_extent - Fiemap helper function
282 + * @fieinfo: Fiemap context passed into ->fiemap
283 + * @logical: Extent logical start offset, in bytes
284 + * @phys: Extent physical start offset, in bytes
285 + * @len: Extent length, in bytes
286 + * @flags: FIEMAP_EXTENT flags that describe this extent
288 + * Called from file system ->fiemap callback. Will populate extent
289 + * info as passed in via arguments and copy to user memory. On
290 + * success, extent count on fieinfo is incremented.
292 + * Returns 0 on success, -errno on error, 1 if this was the last
293 + * extent that will fit in user array.
294 + */
295 +#define SET_UNKNOWN_FLAGS (FIEMAP_EXTENT_DELALLOC)
296 +#define SET_NO_BYPASS_FLAGS (FIEMAP_EXTENT_DATA_ENCRYPTED)
297 +#define SET_NOT_ALIGNED_FLAGS (FIEMAP_EXTENT_DATA_TAIL|FIEMAP_EXTENT_DATA_INLINE)
298 +int fiemap_fill_next_extent(struct fiemap_extent_info *fieinfo, u64 logical,
299 + u64 phys, u64 len, u32 flags)
301 + struct fiemap_extent extent;
302 + struct fiemap_extent *dest = fieinfo->fi_extents_start;
304 + /* only count the extents */
305 + if (fieinfo->fi_extents_max == 0) {
306 + fieinfo->fi_extents_mapped++;
307 + return (flags & FIEMAP_EXTENT_LAST) ? 1 : 0;
310 + if (fieinfo->fi_extents_mapped >= fieinfo->fi_extents_max)
311 + return 1;
313 + if (flags & SET_UNKNOWN_FLAGS)
314 + flags |= FIEMAP_EXTENT_UNKNOWN;
315 + if (flags & SET_NO_BYPASS_FLAGS)
316 + flags |= FIEMAP_EXTENT_NO_BYPASS;
317 + if (flags & SET_NOT_ALIGNED_FLAGS)
318 + flags |= FIEMAP_EXTENT_NOT_ALIGNED;
320 + extent.fe_logical = logical;
321 + extent.fe_physical = phys;
322 + extent.fe_length = len;
323 + extent.fe_flags = flags;
325 + dest += fieinfo->fi_extents_mapped;
326 + if (copy_to_user(dest, &extent, sizeof(extent)))
327 + return -EFAULT;
329 + fieinfo->fi_extents_mapped++;
330 + if (fieinfo->fi_extents_mapped == fieinfo->fi_extents_max)
331 + return 1;
332 + return (flags & FIEMAP_EXTENT_LAST) ? 1 : 0;
334 +EXPORT_SYMBOL(fiemap_fill_next_extent);
336 +/**
337 + * fiemap_check_flags - check validity of requested flags for fiemap
338 + * @fieinfo: Fiemap context passed into ->fiemap
339 + * @fs_flags: Set of fiemap flags that the file system understands
341 + * Called from file system ->fiemap callback. This will compute the
342 + * intersection of valid fiemap flags and those that the fs supports. That
343 + * value is then compared against the user supplied flags. In case of bad user
344 + * flags, the invalid values will be written into the fieinfo structure, and
345 + * -EBADR is returned, which tells ioctl_fiemap() to return those values to
346 + * userspace. For this reason, a return code of -EBADR should be preserved.
348 + * Returns 0 on success, -EBADR on bad flags.
349 + */
350 +int fiemap_check_flags(struct fiemap_extent_info *fieinfo, u32 fs_flags)
352 + u32 incompat_flags;
354 + incompat_flags = fieinfo->fi_flags & ~(FIEMAP_FLAGS_COMPAT & fs_flags);
355 + if (incompat_flags) {
356 + fieinfo->fi_flags = incompat_flags;
357 + return -EBADR;
359 + return 0;
361 +EXPORT_SYMBOL(fiemap_check_flags);
363 +static int fiemap_check_ranges(struct super_block *sb,
364 + u64 start, u64 len, u64 *new_len)
366 + *new_len = len;
368 + if (len == 0)
369 + return -EINVAL;
371 + if (start > sb->s_maxbytes)
372 + return -EFBIG;
374 + /*
375 + * Shrink request scope to what the fs can actually handle.
376 + */
377 + if ((len > sb->s_maxbytes) ||
378 + (sb->s_maxbytes - len) < start)
379 + *new_len = sb->s_maxbytes - start;
381 + return 0;
384 +static int ioctl_fiemap(struct file *filp, unsigned long arg)
386 + struct fiemap fiemap;
387 + struct fiemap_extent_info fieinfo = { 0, };
388 + struct inode *inode = filp->f_path.dentry->d_inode;
389 + struct super_block *sb = inode->i_sb;
390 + u64 len;
391 + int error;
393 + if (!inode->i_op->fiemap)
394 + return -EOPNOTSUPP;
396 + if (copy_from_user(&fiemap, (struct fiemap __user *)arg,
397 + sizeof(struct fiemap)))
398 + return -EFAULT;
400 + if (fiemap.fm_extent_count > FIEMAP_MAX_EXTENTS)
401 + return -EINVAL;
403 + error = fiemap_check_ranges(sb, fiemap.fm_start, fiemap.fm_length,
404 + &len);
405 + if (error)
406 + return error;
408 + fieinfo.fi_flags = fiemap.fm_flags;
409 + fieinfo.fi_extents_max = fiemap.fm_extent_count;
410 + fieinfo.fi_extents_start = (struct fiemap_extent *)(arg + sizeof(fiemap));
412 + if (fiemap.fm_extent_count != 0 &&
413 + !access_ok(VERIFY_WRITE, fieinfo.fi_extents_start,
414 + fieinfo.fi_extents_max * sizeof(struct fiemap_extent)))
415 + return -EFAULT;
417 + if (fieinfo.fi_flags & FIEMAP_FLAG_SYNC)
418 + filemap_write_and_wait(inode->i_mapping);
420 + error = inode->i_op->fiemap(inode, &fieinfo, fiemap.fm_start, len);
421 + fiemap.fm_flags = fieinfo.fi_flags;
422 + fiemap.fm_mapped_extents = fieinfo.fi_extents_mapped;
423 + if (copy_to_user((char *)arg, &fiemap, sizeof(fiemap)))
424 + error = -EFAULT;
426 + return error;
429 static int file_ioctl(struct file *filp, unsigned int cmd,
430 unsigned long arg)
432 @@ -80,6 +232,8 @@ static int file_ioctl(struct file *filp, unsigned int cmd,
433 switch (cmd) {
434 case FIBMAP:
435 return ioctl_fibmap(filp, p);
436 + case FS_IOC_FIEMAP:
437 + return ioctl_fiemap(filp, arg);
438 case FIGETBSZ:
439 return put_user(inode->i_sb->s_blocksize, p);
440 case FIONREAD:
441 diff --git a/include/linux/fiemap.h b/include/linux/fiemap.h
442 new file mode 100644
443 index 0000000..29e5862
444 --- /dev/null
445 +++ b/include/linux/fiemap.h
446 @@ -0,0 +1,62 @@
448 + * FS_IOC_FIEMAP ioctl infrastructure.
450 + * Some portions copyright (C) 2007 Cluster File Systems, Inc
452 + * Authors: Mark Fasheh <mfasheh@suse.com>
453 + * Kalpak Shah <kalpak.shah@sun.com>
454 + * Andreas Dilger <adilger@sun.com>
455 + */
457 +#ifndef _LINUX_FIEMAP_H
458 +#define _LINUX_FIEMAP_H
460 +struct fiemap_extent {
461 + __u64 fe_logical; /* logical offset in bytes for the start of
462 + * the extent from the beginning of the file */
463 + __u64 fe_physical; /* physical offset in bytes for the start
464 + * of the extent from the beginning of the disk */
465 + __u64 fe_length; /* length in bytes for this extent */
466 + __u32 fe_flags; /* FIEMAP_EXTENT_* flags for this extent */
467 + __u32 fe_reserved;
470 +struct fiemap {
471 + __u64 fm_start; /* logical offset (inclusive) at
472 + * which to start mapping (in) */
473 + __u64 fm_length; /* logical length of mapping which
474 + * userspace wants (in) */
475 + __u32 fm_flags; /* FIEMAP_FLAG_* flags for request (in/out) */
476 + __u32 fm_mapped_extents;/* number of extents that were mapped (out) */
477 + __u32 fm_extent_count; /* size of fm_extents array (in) */
478 + __u32 fm_reserved;
479 + struct fiemap_extent fm_extents[0]; /* array of mapped extents (out) */
482 +#define FIEMAP_MAX_OFFSET (~0ULL)
484 +#define FIEMAP_FLAG_SYNC 0x00000001 /* sync file data before map */
485 +#define FIEMAP_FLAG_XATTR 0x00000002 /* map extended attribute tree */
487 +#define FIEMAP_FLAGS_COMPAT (FIEMAP_FLAG_SYNC | FIEMAP_FLAG_XATTR)
489 +#define FIEMAP_EXTENT_LAST 0x00000001 /* Last extent in file. */
490 +#define FIEMAP_EXTENT_UNKNOWN 0x00000002 /* Data location unknown. */
491 +#define FIEMAP_EXTENT_DELALLOC 0x00000004 /* Location still pending.
492 + * Sets EXTENT_UNKNOWN. */
493 +#define FIEMAP_EXTENT_NO_BYPASS 0x00000008 /* Data mapping undefined */
494 +#define FIEMAP_EXTENT_DATA_ENCRYPTED 0x00000080 /* Data is encrypted by fs.
495 + * Sets EXTENT_NO_BYPASS. */
496 +#define FIEMAP_EXTENT_NOT_ALIGNED 0x00000100 /* Extent offsets may not be
497 + * block aligned. */
498 +#define FIEMAP_EXTENT_DATA_INLINE 0x00000200 /* Data mixed with metadata.
499 + * Sets EXTENT_NOT_ALIGNED.*/
500 +#define FIEMAP_EXTENT_DATA_TAIL 0x00000400 /* Multiple files in block.
501 + * Sets EXTENT_NOT_ALIGNED.*/
502 +#define FIEMAP_EXTENT_UNWRITTEN 0x00000800 /* Space allocated, but
503 + * no data (i.e. zero). */
504 +#define FIEMAP_EXTENT_MERGED 0x00001000 /* File does not natively
505 + * support extents. Result
506 + * merged for efficiency. */
508 +#endif /* _LINUX_FIEMAP_H */
509 diff --git a/include/linux/fs.h b/include/linux/fs.h
510 index 580b513..194fb23 100644
511 --- a/include/linux/fs.h
512 +++ b/include/linux/fs.h
513 @@ -231,6 +231,7 @@ extern int dir_notify_enable;
514 #define FS_IOC_SETFLAGS _IOW('f', 2, long)
515 #define FS_IOC_GETVERSION _IOR('v', 1, long)
516 #define FS_IOC_SETVERSION _IOW('v', 2, long)
517 +#define FS_IOC_FIEMAP _IOWR('f', 11, struct fiemap)
518 #define FS_IOC32_GETFLAGS _IOR('f', 1, int)
519 #define FS_IOC32_SETFLAGS _IOW('f', 2, int)
520 #define FS_IOC32_GETVERSION _IOR('v', 1, int)
521 @@ -291,6 +292,7 @@ extern int dir_notify_enable;
522 #include <linux/mutex.h>
523 #include <linux/capability.h>
524 #include <linux/semaphore.h>
525 +#include <linux/fiemap.h>
527 #include <asm/atomic.h>
528 #include <asm/byteorder.h>
529 @@ -1179,6 +1181,20 @@ extern void dentry_unhash(struct dentry *dentry);
530 extern int file_permission(struct file *, int);
533 + * VFS FS_IOC_FIEMAP helper definitions.
534 + */
535 +struct fiemap_extent_info {
536 + unsigned int fi_flags; /* Flags as passed from user */
537 + unsigned int fi_extents_mapped; /* Number of mapped extents */
538 + unsigned int fi_extents_max; /* Size of fiemap_extent array */
539 + struct fiemap_extent *fi_extents_start; /* Start of fiemap_extent
540 + * array */
542 +int fiemap_fill_next_extent(struct fiemap_extent_info *info, u64 logical,
543 + u64 phys, u64 len, u32 flags);
544 +int fiemap_check_flags(struct fiemap_extent_info *fieinfo, u32 fs_flags);
547 * File types
549 * NOTE! These match bits 12..15 of stat.st_mode
550 @@ -1287,6 +1303,8 @@ struct inode_operations {
551 void (*truncate_range)(struct inode *, loff_t, loff_t);
552 long (*fallocate)(struct inode *inode, int mode, loff_t offset,
553 loff_t len);
554 + int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start,
555 + u64 len);
558 struct seq_file;
560 1.5.6.1.205.ge2c7.dirty