summaryrefslogtreecommitdiff
path: root/fs/xfs/libxfs/xfs_refcount.c
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2022-10-10 11:13:20 -0700
committerDarrick J. Wong <djwong@kernel.org>2022-10-27 10:10:01 -0700
commit686b1013f7f0dfc30230b2cdbd7f1617dc5d13b5 (patch)
treef7444589cc8f08ec813c0335c8d1b6d1b4016557 /fs/xfs/libxfs/xfs_refcount.c
parentc417a7321ec44cf7c8bb54885b45553a4e41d1fd (diff)
xfs: rename XFS_REFC_COW_START to _COWFLAGrefcount-cow-domain-6.1_2022-10-27
We've been (ab)using XFS_REFC_COW_START as both an integer quantity and a bit flag, even though it's *only* a bit flag. Rename the variable to reflect its nature and update the cast target since we're not supposed to be comparing it to xfs_agblock_t now. Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/libxfs/xfs_refcount.c')
-rw-r--r--fs/xfs/libxfs/xfs_refcount.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/xfs/libxfs/xfs_refcount.c b/fs/xfs/libxfs/xfs_refcount.c
index 05fa18b9e0ed..740959445170 100644
--- a/fs/xfs/libxfs/xfs_refcount.c
+++ b/fs/xfs/libxfs/xfs_refcount.c
@@ -108,8 +108,8 @@ xfs_refcount_btrec_to_irec(
__u32 start;
start = be32_to_cpu(rec->refc.rc_startblock);
- if (start & XFS_REFC_COW_START) {
- start &= ~XFS_REFC_COW_START;
+ if (start & XFS_REFC_COWFLAG) {
+ start &= ~XFS_REFC_COWFLAG;
irec->rc_domain = XFS_REFC_DOMAIN_COW;
} else {
irec->rc_domain = XFS_REFC_DOMAIN_SHARED;
@@ -1814,7 +1814,7 @@ xfs_refcount_recover_cow_leftovers(
int error;
/* reflink filesystems mustn't have AGs larger than 2^31-1 blocks */
- BUILD_BUG_ON(XFS_MAX_CRC_AG_BLOCKS >= XFS_REFC_COW_START);
+ BUILD_BUG_ON(XFS_MAX_CRC_AG_BLOCKS >= XFS_REFC_COWFLAG);
if (mp->m_sb.sb_agblocks > XFS_MAX_CRC_AG_BLOCKS)
return -EOPNOTSUPP;