Skip to content

Commit

Permalink
iomap: Add IOMAP_F_DATA_INLINE flag
Browse files Browse the repository at this point in the history
Add a new IOMAP_F_DATA_INLINE flag to indicate that a mapping is in a
disk area that contains data as well as metadata.  In iomap_fiemap, map
this flag to FIEMAP_EXTENT_DATA_INLINE.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Jan Kara <jack@suse.cz>
  • Loading branch information
Andreas Gruenbacher authored and Theodore Ts'o committed Oct 1, 2017
1 parent 19fe5f6 commit 9ca250a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions fs/iomap.c
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,8 @@ static int iomap_to_fiemap(struct fiemap_extent_info *fi,
flags |= FIEMAP_EXTENT_MERGED;
if (iomap->flags & IOMAP_F_SHARED)
flags |= FIEMAP_EXTENT_SHARED;
if (iomap->flags & IOMAP_F_DATA_INLINE)
flags |= FIEMAP_EXTENT_DATA_INLINE;

return fiemap_fill_next_extent(fi, iomap->offset,
iomap->addr != IOMAP_NULL_ADDR ? iomap->addr : 0,
Expand Down
5 changes: 3 additions & 2 deletions include/linux/iomap.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ struct vm_fault;
/*
* Flags that only need to be reported for IOMAP_REPORT requests:
*/
#define IOMAP_F_MERGED 0x10 /* contains multiple blocks/extents */
#define IOMAP_F_SHARED 0x20 /* block shared with another file */
#define IOMAP_F_MERGED 0x10 /* contains multiple blocks/extents */
#define IOMAP_F_SHARED 0x20 /* block shared with another file */
#define IOMAP_F_DATA_INLINE 0x40 /* data inline in the inode */

/*
* Magic value for addr:
Expand Down

0 comments on commit 9ca250a

Please sign in to comment.