xfs: rename xfs_bmap_is_real_extent to is_written_extent
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 29 Jun 2020 21:47:18 +0000 (14:47 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Mon, 6 Jul 2020 17:46:57 +0000 (10:46 -0700)
The name of this predicate is a little misleading -- it decides if the
extent mapping is allocated and written.  Change the name to be more
direct, as we're going to add a new predicate in the next patch.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
fs/xfs/libxfs/xfs_bmap.h
fs/xfs/libxfs/xfs_rtbitmap.c
fs/xfs/xfs_reflink.c

index 6028a3c825bac8850f7cd5421eec80a0bd792cc7..2b18338d06437711c356744253c893615a0ad323 100644 (file)
@@ -163,7 +163,7 @@ static inline int xfs_bmapi_whichfork(int bmapi_flags)
  * Return true if the extent is a real, allocated extent, or false if it is  a
  * delayed allocation, and unwritten extent or a hole.
  */
-static inline bool xfs_bmap_is_real_extent(struct xfs_bmbt_irec *irec)
+static inline bool xfs_bmap_is_written_extent(struct xfs_bmbt_irec *irec)
 {
        return irec->br_state != XFS_EXT_UNWRITTEN &&
                irec->br_startblock != HOLESTARTBLOCK &&
index 9498ced947be9e85064031b4f29bdeb2c9648ab4..1d9fa8a300f1561624b43680e09088ef24c4e85b 100644 (file)
@@ -70,7 +70,7 @@ xfs_rtbuf_get(
        if (error)
                return error;
 
-       if (XFS_IS_CORRUPT(mp, nmap == 0 || !xfs_bmap_is_real_extent(&map)))
+       if (XFS_IS_CORRUPT(mp, nmap == 0 || !xfs_bmap_is_written_extent(&map)))
                return -EFSCORRUPTED;
 
        ASSERT(map.br_startblock != NULLFSBLOCK);
index d89201d40891fab605c28eabd14038c4d9c6b7f0..22fdea6d69d3d20bd7281bd81da5405407f1f60a 100644 (file)
@@ -179,7 +179,7 @@ xfs_reflink_trim_around_shared(
        int                     error = 0;
 
        /* Holes, unwritten, and delalloc extents cannot be shared */
-       if (!xfs_is_cow_inode(ip) || !xfs_bmap_is_real_extent(irec)) {
+       if (!xfs_is_cow_inode(ip) || !xfs_bmap_is_written_extent(irec)) {
                *shared = false;
                return 0;
        }
@@ -655,7 +655,7 @@ xfs_reflink_end_cow_extent(
         * preallocations can leak into the range we are called upon, and we
         * need to skip them.
         */
-       if (!xfs_bmap_is_real_extent(&got)) {
+       if (!xfs_bmap_is_written_extent(&got)) {
                *end_fsb = del.br_startoff;
                goto out_cancel;
        }
@@ -996,7 +996,7 @@ xfs_reflink_remap_extent(
        xfs_off_t               new_isize)
 {
        struct xfs_mount        *mp = ip->i_mount;
-       bool                    real_extent = xfs_bmap_is_real_extent(irec);
+       bool                    real_extent = xfs_bmap_is_written_extent(irec);
        struct xfs_trans        *tp;
        unsigned int            resblks;
        struct xfs_bmbt_irec    uirec;