diff options
author | Christoph Hellwig <hch@lst.de> | 2017-03-28 14:53:35 -0700 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2017-04-03 15:18:16 -0700 |
commit | 9c4f29d39168bb9363189f0d54ee1202372e7d9b (patch) | |
tree | 4122955d6116b4622185c2ff26f9e756567f9afa /fs/xfs/xfs_bmap_util.c | |
parent | 696a562072e3c14bcd13ae5acc19cdf27679e865 (diff) | |
download | linux-stable-9c4f29d39168bb9363189f0d54ee1202372e7d9b.tar.gz linux-stable-9c4f29d39168bb9363189f0d54ee1202372e7d9b.tar.bz2 linux-stable-9c4f29d39168bb9363189f0d54ee1202372e7d9b.zip |
xfs: factor out a xfs_bmap_is_real_extent helper
This checks for all the non-normal extent types, including handling both
encodings of delayed allocations.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/xfs_bmap_util.c')
-rw-r--r-- | fs/xfs/xfs_bmap_util.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/xfs/xfs_bmap_util.c b/fs/xfs/xfs_bmap_util.c index 828532ce0adc..4d1920e594b0 100644 --- a/fs/xfs/xfs_bmap_util.c +++ b/fs/xfs/xfs_bmap_util.c @@ -448,10 +448,9 @@ xfs_getbmap_adjust_shared( next_map->br_blockcount = 0; /* Only written data blocks can be shared. */ - if (!xfs_is_reflink_inode(ip) || whichfork != XFS_DATA_FORK || - map->br_startblock == DELAYSTARTBLOCK || - map->br_startblock == HOLESTARTBLOCK || - ISUNWRITTEN(map)) + if (!xfs_is_reflink_inode(ip) || + whichfork != XFS_DATA_FORK || + !xfs_bmap_is_real_extent(map)) return 0; agno = XFS_FSB_TO_AGNO(mp, map->br_startblock); |