| To: | david@xxxxxxxxxxxxx, viro@xxxxxxxxxxxxxxxxxx, darrick.wong@xxxxxxxxxx |
|---|---|
| Subject: | [PATCH 6/6] iomap: add a flag to report shared extents |
| From: | "Darrick J. Wong" <darrick.wong@xxxxxxxxxx> |
| Date: | Thu, 25 Aug 2016 16:31:20 -0700 |
| Cc: | linux-xfs@xxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx, linux-api@xxxxxxxxxxxxxxx, xfs@xxxxxxxxxxx |
| Delivered-to: | xfs@xxxxxxxxxxx |
| In-reply-to: | <147216784041.525.7722906502172299465.stgit@xxxxxxxxxxxxxxxx> |
| References: | <147216784041.525.7722906502172299465.stgit@xxxxxxxxxxxxxxxx> |
| User-agent: | StGit/0.17.1-dirty |
Signed-off-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx>
---
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:
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [PATCH 5/6] iomap: don't set FIEMAP_EXTENT_MERGED for extent based filesystems, Darrick J. Wong |
|---|---|
| Next by Date: | [PATCH v8 00/71] xfs: add reflink and dedupe support, Darrick J. Wong |
| Previous by Thread: | [PATCH 5/6] iomap: don't set FIEMAP_EXTENT_MERGED for extent based filesystems, Darrick J. Wong |
| Next by Thread: | [PATCH v8 00/71] xfs: add reflink and dedupe support, Darrick J. Wong |
| Indexes: | [Date] [Thread] [Top] [All Lists] |