]> git.baikalelectronics.ru Git - kernel.git/commitdiff
xfs: rename xfs_bmap_is_real_extent to is_written_extent
authorDarrick J. Wong <darrick.wong@oracle.com>
Fri, 11 Nov 2022 04:10:21 +0000 (09:40 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 Nov 2022 16:42:03 +0000 (17:42 +0100)
commit 9db06921e6d64d3db44eae89ca1aec6438ec2b11 upstream.

[ Slightly modify fs/xfs/libxfs/xfs_rtbitmap.c & fs/xfs/xfs_reflink.c to
  resolve merge conflict ]

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>
Acked-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Chandan Babu R <chandan.babu@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/xfs/libxfs/xfs_bmap.h
fs/xfs/libxfs/xfs_rtbitmap.c
fs/xfs/xfs_reflink.c

index 640dcc036ea94b63a767d4319c1561745e8e8531..b5363c6c88af5f57d27be2df049aa17cd3eabcd2 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 85f123b3dfcc14c526b91ca81c5b29ca008bf54d..cf99e4cab627794f4327e2cec44b9aafd1f90c7d 100644 (file)
@@ -70,7 +70,7 @@ xfs_rtbuf_get(
        if (error)
                return error;
 
-       if (nmap == 0 || !xfs_bmap_is_real_extent(&map)) {
+       if (nmap == 0 || !xfs_bmap_is_written_extent(&map)) {
                XFS_ERROR_REPORT(__func__, XFS_ERRLEVEL_LOW, mp);
                return -EFSCORRUPTED;
        }
index dfbf3f8f1ec86018580838fe3ee3f1c77790aaa1..77b7ace04ffdc4fbacb5878aef459e0722aa9b83 100644 (file)
@@ -181,7 +181,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;
        }
@@ -657,7 +657,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;
        }
@@ -998,7 +998,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;
@@ -1427,7 +1427,7 @@ xfs_reflink_dirty_extents(
                        goto out;
                if (nmaps == 0)
                        break;
-               if (!xfs_bmap_is_real_extent(&map[0]))
+               if (!xfs_bmap_is_written_extent(&map[0]))
                        goto next;
 
                map[1] = map[0];