]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: rename xfs_bmap_is_real_extent to is_written_extent
authorDarrick J. Wong <darrick.wong@oracle.com>
Fri, 4 Sep 2020 19:53:20 +0000 (15:53 -0400)
committerEric Sandeen <sandeen@sandeen.net>
Fri, 4 Sep 2020 19:53:20 +0000 (15:53 -0400)
Source kernel commit: 877f58f53684f14ca3202640f70592bf44890924

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>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_bmap.h
libxfs/xfs_rtbitmap.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 4df279cd9a1099e46c92dbc1f943fc53fd11ef52..1bb5c75f888aec6d8df89f94599d86a033fde9e5 100644 (file)
@@ -68,7 +68,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);