summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_bmap_util.c
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2023-10-16 19:34:39 +0300
committerDarrick J. Wong <djwong@kernel.org>2023-10-18 02:24:22 +0300
commit68db60bf01c131c09bbe35adf43bd957a4c124bc (patch)
tree05898334658a0cc5e8d1a50dfc32d02f7e971668 /fs/xfs/xfs_bmap_util.c
parentfa5a387230861116c2434c20d29fc4b3fd077d24 (diff)
downloadlinux-68db60bf01c131c09bbe35adf43bd957a4c124bc.tar.xz
xfs: create a helper to compute leftovers of realtime extents
Create a helper to compute the misalignment between a file extent (xfs_extlen_t) and a realtime extent. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/xfs_bmap_util.c')
-rw-r--r--fs/xfs/xfs_bmap_util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/xfs_bmap_util.c b/fs/xfs/xfs_bmap_util.c
index 2d747084c199..8895184ff90a 100644
--- a/fs/xfs/xfs_bmap_util.c
+++ b/fs/xfs/xfs_bmap_util.c
@@ -97,7 +97,7 @@ retry:
if (error)
return error;
ASSERT(ap->length);
- ASSERT(ap->length % mp->m_sb.sb_rextsize == 0);
+ ASSERT(xfs_extlen_to_rtxmod(mp, ap->length) == 0);
/*
* If we shifted the file offset downward to satisfy an extent size