Commit e43c460d authored by Darrick J. Wong's avatar Darrick J. Wong Committed by Dave Chinner

iomap: add a flag to report shared extents

Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarDave Chinner <david@fromorbit.com>
parent 5f4e5752
...@@ -512,6 +512,8 @@ static int iomap_to_fiemap(struct fiemap_extent_info *fi, ...@@ -512,6 +512,8 @@ static int iomap_to_fiemap(struct fiemap_extent_info *fi,
if (iomap->flags & IOMAP_F_MERGED) if (iomap->flags & IOMAP_F_MERGED)
flags |= FIEMAP_EXTENT_MERGED; flags |= FIEMAP_EXTENT_MERGED;
if (iomap->flags & IOMAP_F_SHARED)
flags |= FIEMAP_EXTENT_SHARED;
return fiemap_fill_next_extent(fi, iomap->offset, return fiemap_fill_next_extent(fi, iomap->offset,
iomap->blkno != IOMAP_NULL_BLOCK ? iomap->blkno << 9: 0, iomap->blkno != IOMAP_NULL_BLOCK ? iomap->blkno << 9: 0,
......
...@@ -22,6 +22,7 @@ struct vm_fault; ...@@ -22,6 +22,7 @@ struct vm_fault;
* Flags for iomap mappings: * Flags for iomap mappings:
*/ */
#define IOMAP_F_MERGED 0x01 /* contains multiple blocks/extents */ #define IOMAP_F_MERGED 0x01 /* contains multiple blocks/extents */
#define IOMAP_F_SHARED 0x02 /* block shared with another file */
/* /*
* Magic value for blkno: * Magic value for blkno:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment