]> git.apps.os.sepia.ceph.com Git - xfsprogs-dev.git/commitdiff
repair: fix the call to search_rt_dup_extent in scan_bmapbt
authorChristoph Hellwig <hch@lst.de>
Thu, 9 Nov 2023 16:02:33 +0000 (17:02 +0100)
committerCarlos Maiolino <cem@kernel.org>
Tue, 21 Nov 2023 13:09:36 +0000 (14:09 +0100)
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>
repair/scan.c

index 27a33286a20fd522ad27104f2c2e933e7f960c48..7a0587615cb91e90673f610c126f71e657fd6e75 100644 (file)
@@ -402,8 +402,10 @@ _("bad state %d, inode %" PRIu64 " bmap block 0x%" PRIx64 "\n"),
                                        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)++;