[PATCH] repair: fix process_rt_rec_dups

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



search_rt_dup_extent takes a xfs_rtblock_t, not an RT extent number.

Signed-off-by: Christoph Hellwig <hch@xxxxxx>
---

What scares me about this is that no test seems to hit this and report
false duplicates.  I'll need to see if I can come up with an
artifical reproducers of some kind.

 repair/dinode.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/repair/dinode.c b/repair/dinode.c
index c10dd1fa3..9aa367138 100644
--- a/repair/dinode.c
+++ b/repair/dinode.c
@@ -194,13 +194,11 @@ process_rt_rec_dups(
 	struct xfs_bmbt_irec	*irec)
 {
 	xfs_fsblock_t		b;
-	xfs_rtblock_t		ext;
 
 	for (b = rounddown(irec->br_startblock, mp->m_sb.sb_rextsize);
 	     b < irec->br_startblock + irec->br_blockcount;
 	     b += mp->m_sb.sb_rextsize) {
-		ext = (xfs_rtblock_t) b / mp->m_sb.sb_rextsize;
-		if (search_rt_dup_extent(mp, ext))  {
+		if (search_rt_dup_extent(mp, b))  {
 			do_warn(
 _("data fork in rt ino %" PRIu64 " claims dup rt extent,"
 "off - %" PRIu64 ", start - %" PRIu64 ", count %" PRIu64 "\n"),
-- 
2.39.2




[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux