Base the ext4 patch series on rc3
[ext4-patch-queue.git] / add-IOMAP_F_DATA_INLINE-flag
blob08611847b60d568c6ce4f8655834aed991dee6ec
1 iomap: Add IOMAP_F_DATA_INLINE flag
3 From: Andreas Gruenbacher <agruenba@redhat.com>
5 Add a new IOMAP_F_DATA_INLINE flag to indicate that a mapping is in a
6 disk area that contains data as well as metadata.  In iomap_fiemap, map
7 this flag to FIEMAP_EXTENT_DATA_INLINE.
9 Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
10 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
11 Reviewed-by: Jan Kara <jack@suse.cz>
12 ---
13  fs/iomap.c            | 2 ++
14  include/linux/iomap.h | 5 +++--
15  2 files changed, 5 insertions(+), 2 deletions(-)
17 diff --git a/fs/iomap.c b/fs/iomap.c
18 index 622c731c57a0..20b303ac109b 100644
19 --- a/fs/iomap.c
20 +++ b/fs/iomap.c
21 @@ -510,6 +510,8 @@ static int iomap_to_fiemap(struct fiemap_extent_info *fi,
22                 flags |= FIEMAP_EXTENT_MERGED;
23         if (iomap->flags & IOMAP_F_SHARED)
24                 flags |= FIEMAP_EXTENT_SHARED;
25 +       if (iomap->flags & IOMAP_F_DATA_INLINE)
26 +               flags |= FIEMAP_EXTENT_DATA_INLINE;
28         return fiemap_fill_next_extent(fi, iomap->offset,
29                         iomap->addr != IOMAP_NULL_ADDR ? iomap->addr : 0,
30 diff --git a/include/linux/iomap.h b/include/linux/iomap.h
31 index 7b8a615fa021..2b0790dbd6ea 100644
32 --- a/include/linux/iomap.h
33 +++ b/include/linux/iomap.h
34 @@ -26,8 +26,9 @@ struct vm_fault;
35  /*
36   * Flags that only need to be reported for IOMAP_REPORT requests:
37   */
38 -#define IOMAP_F_MERGED 0x10    /* contains multiple blocks/extents */
39 -#define IOMAP_F_SHARED 0x20    /* block shared with another file */
40 +#define IOMAP_F_MERGED         0x10    /* contains multiple blocks/extents */
41 +#define IOMAP_F_SHARED         0x20    /* block shared with another file */
42 +#define IOMAP_F_DATA_INLINE    0x40    /* data inline in the inode */
44  /*
45   * Magic value for addr:
46 -- 
47 2.13.3