search_rt_dup_extent expects an RT extent number and not a fsbno.
Convert the units before the call. Without this we are unlikely
to ever found a legit duplicate extent on the RT subvolume because
the search will always be off the end.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
XFS_FSB_TO_AGBNO(mp, bno) + 1))
return(1);
} else {
- if (search_rt_dup_extent(mp, bno))
- return(1);
+ xfs_rtblock_t ext = bno / mp->m_sb.sb_rextsize;
+
+ if (search_rt_dup_extent(mp, ext))
+ return 1;
}
}
(*tot)++;