Skip to content

Commit

Permalink
iomap: add a flag to report shared extents
Browse files Browse the repository at this point in the history
Signed-off-by: Darrick J. Wong <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Signed-off-by: Dave Chinner <[email protected]>
  • Loading branch information
djwong authored and dchinner committed Sep 19, 2016
1 parent 5f4e575 commit e43c460
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fs/iomap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions include/linux/iomap.h
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit e43c460

Please sign in to comment.