]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
iomap: Add IOMAP_F_DATA_INLINE flag
authorAndreas Gruenbacher <agruenba@redhat.com>
Sun, 1 Oct 2017 21:56:54 +0000 (17:56 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 1 Oct 2017 21:56:54 +0000 (17:56 -0400)
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>
fs/iomap.c
include/linux/iomap.h

index d25db039ee1364ab572867cfea4d1100b6acdd26..379eb9896093ce7b8ed751d31bfa01f6ec3f2669 100644 (file)
@@ -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,
index 7b8a615fa021363a12a306248cc73df23069906a..2b0790dbd6ea72792f235638cbe7992c57cebc22 100644 (file)
@@ -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: