On Tue, Nov 19, 2024 at 08:21:42AM -0800, Darrick J. Wong wrote: > > - xfs_daddr_t daddr = XFS_FSB_TO_BB(mp, last_block); > > + xfs_daddr_t daddr = xfs_rtb_to_daddr(mp, last_block); > > struct xfs_buf *bp; > > int error; > > > > - if (XFS_BB_TO_FSB(mp, daddr) != last_block) { > > + if (xfs_daddr_to_rtb(mp, daddr) != last_block) { > > Er... this converts the daddr to a segmented xfs_rtblock_t type, but > last_block is a non segmented xfs_rfsblock_t type. You can't compare > the two directly. I think the code was correct without this patch. Hmm. Yeah, it just breaks the other things I'm about to overload xfs_rtb_to_daddr/xfs_daddr_to_rtb with.. Time for even more helpers probably..