From: Darrick J. Wong Date: Thu, 21 Nov 2024 00:24:26 +0000 (-0800) Subject: libxfs: adjust xfs_fsb_to_db to handle segmented rtblocks X-Git-Tag: v6.13.0~78 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=762043aee95d91abc49e886d8bde93aa5f0e60a4;p=thirdparty%2Fxfsprogs-dev.git libxfs: adjust xfs_fsb_to_db to handle segmented rtblocks Update this function to handle segmented xfs_rtblock_t, just like we did for the kernel. Signed-off-by: "Darrick J. Wong" Reviewed-by: Christoph Hellwig --- diff --git a/libxfs/util.c b/libxfs/util.c index ed48e204..4a9dd254 100644 --- a/libxfs/util.c +++ b/libxfs/util.c @@ -433,7 +433,7 @@ static xfs_daddr_t xfs_fsb_to_db(struct xfs_inode *ip, xfs_fsblock_t fsb) { if (XFS_IS_REALTIME_INODE(ip)) - return XFS_FSB_TO_BB(ip->i_mount, fsb); + return xfs_rtb_to_daddr(ip->i_mount, fsb); return XFS_FSB_TO_DADDR(ip->i_mount, (fsb)); }