From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: david@fromorbit.com, viro@ZenIV.linux.org.uk, darrick.wong@oracle.com
Cc: linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-api@vger.kernel.org, xfs@oss.sgi.com
Subject: [PATCH 6/6] iomap: add a flag to report shared extents
Date: Thu, 25 Aug 2016 16:31:20 -0700 [thread overview]
Message-ID: <147216788009.525.789325200721590680.stgit@birch.djwong.org> (raw)
In-Reply-To: <147216784041.525.7722906502172299465.stgit@birch.djwong.org>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
fs/iomap.c | 2 ++
include/linux/iomap.h | 1 +
2 files changed, 3 insertions(+)
diff --git a/fs/iomap.c b/fs/iomap.c
index e9b3f99..ec411a6 100644
--- a/fs/iomap.c
+++ b/fs/iomap.c
@@ -512,6 +512,8 @@ static int iomap_to_fiemap(struct fiemap_extent_info *fi,
if (iomap->flags & IOMAP_F_MERGED)
flags |= FIEMAP_EXTENT_MERGED;
+ if (iomap->flags & IOMAP_F_SHARED)
+ flags |= FIEMAP_EXTENT_SHARED;
return fiemap_fill_next_extent(fi, iomap->offset,
iomap->blkno != IOMAP_NULL_BLOCK ? iomap->blkno << 9: 0,
diff --git a/include/linux/iomap.h b/include/linux/iomap.h
index 3a56212..c74226a 100644
--- a/include/linux/iomap.h
+++ b/include/linux/iomap.h
@@ -22,6 +22,7 @@ struct vm_fault;
* Flags for iomap mappings:
*/
#define IOMAP_F_MERGED 0x01 /* contains multiple blocks/extents */
+#define IOMAP_F_SHARED 0x02 /* block shared with another file */
/*
* Magic value for blkno:
next prev parent reply other threads:[~2016-08-25 23:31 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-25 23:30 [PATCH v8 0/6] vfs: help support reflink for XFS Darrick J. Wong
2016-08-25 23:30 ` [PATCH 1/6] vfs: fix return type of ioctl_file_dedupe_range Darrick J. Wong
2016-08-25 23:30 ` [PATCH 2/6] vfs: cap dedupe request structure size at PAGE_SIZE Darrick J. Wong
2016-09-05 14:55 ` Christoph Hellwig
2016-09-13 1:16 ` Darrick J. Wong
2016-09-14 20:22 ` Christoph Hellwig
2016-08-25 23:31 ` [PATCH 3/6] vfs: support FS_XFLAG_REFLINK and FS_XFLAG_COWEXTSIZE Darrick J. Wong
2016-09-05 14:56 ` Christoph Hellwig
2016-09-06 19:15 ` Darrick J. Wong
2016-09-11 12:58 ` Christoph Hellwig
2016-09-12 19:12 ` Darrick J. Wong
2016-08-25 23:31 ` [PATCH 4/6] fs: add iomap_file_dirty Christoph Hellwig
2016-09-05 14:57 ` Christoph Hellwig
2016-09-06 17:34 ` Darrick J. Wong
2016-09-11 12:58 ` Christoph Hellwig
2016-09-19 0:11 ` Dave Chinner
2016-08-25 23:31 ` [PATCH 5/6] iomap: don't set FIEMAP_EXTENT_MERGED for extent based filesystems Darrick J. Wong
2016-08-25 23:31 ` Darrick J. Wong [this message]
2016-09-05 14:58 ` [PATCH 6/6] iomap: add a flag to report shared extents Christoph Hellwig
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=147216788009.525.789325200721590680.stgit@birch.djwong.org \
--to=darrick.wong@oracle.com \
--cc=david@fromorbit.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=viro@ZenIV.linux.org.uk \
--cc=xfs@oss.sgi.com \
/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;
as well as URLs for NNTP newsgroup(s).