From: Andreas Gruenbacher <agruenba@redhat.com>
To: linux-fsdevel@vger.kernel.org
Cc: linux-ext4@vger.kernel.org, linux-xfs@vger.kernel.org,
Jan Kara <jack@suse.cz>, Christoph Hellwig <hch@lst.de>,
Andreas Gruenbacher <agruenba@redhat.com>
Subject: [PATCH v2 2/4] iomap: Add IOMAP_F_DATA_INLINE flag
Date: Thu, 14 Sep 2017 11:50:45 +0200 [thread overview]
Message-ID: <20170914095047.23935-3-agruenba@redhat.com> (raw)
In-Reply-To: <20170914095047.23935-1-agruenba@redhat.com>
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>
Reviewed-by: Jan Kara <jack@suse.cz>
---
fs/iomap.c | 2 ++
include/linux/iomap.h | 5 +++--
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/fs/iomap.c b/fs/iomap.c
index 622c731c57a0..20b303ac109b 100644
--- a/fs/iomap.c
+++ b/fs/iomap.c
@@ -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,
diff --git a/include/linux/iomap.h b/include/linux/iomap.h
index 7b8a615fa021..2b0790dbd6ea 100644
--- a/include/linux/iomap.h
+++ b/include/linux/iomap.h
@@ -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:
--
2.13.3
next prev parent reply other threads:[~2017-09-14 9:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-14 9:50 [PATCH v2 0/4] ext4: SEEK_HOLE / SEEK_DATA via iomap Andreas Gruenbacher
2017-09-14 9:50 ` [PATCH v2 1/4] iomap: Switch from blkno to disk offset Andreas Gruenbacher
2017-09-14 9:50 ` Andreas Gruenbacher [this message]
2017-09-14 9:50 ` [PATCH v2 3/4] ext4: Add iomap support for inline data Andreas Gruenbacher
2017-09-28 17:57 ` Theodore Ts'o
2017-10-02 14:39 ` Andreas Gruenbacher
2017-10-02 15:02 ` Theodore Ts'o
2017-09-14 9:50 ` [PATCH v2 4/4] ext4: Switch to iomap for SEEK_HOLE / SEEK_DATA Andreas Gruenbacher
2017-09-14 12:02 ` Jan Kara
2017-09-14 12:47 ` Andreas Grünbacher
2017-09-14 13:14 ` Jan Kara
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170914095047.23935-3-agruenba@redhat.com \
--to=agruenba@redhat.com \
--cc=hch@lst.de \
--cc=jack@suse.cz \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox