All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: Christoph Hellwig <hch@lst.de>, linux-xfs@vger.kernel.org
Subject: Re: [PATCH] repair: fix process_rt_rec_dups
Date: Wed, 8 Nov 2023 19:21:01 +0100	[thread overview]
Message-ID: <20231108182101.GA17121@lst.de> (raw)
In-Reply-To: <20231108180827.GW1205143@frogsfrogsfrogs>

On Wed, Nov 08, 2023 at 10:08:27AM -0800, Darrick J. Wong wrote:
> On Wed, Nov 08, 2023 at 06:53:20PM +0100, Christoph Hellwig wrote:
> > search_rt_dup_extent takes a xfs_rtblock_t, not an RT extent number.
> > 
> > Signed-off-by: Christoph Hellwig <hch@lst.de>
> > ---
> > 
> > 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.
> 
> I think you've misread the code -- phase 4 builds the rt_dup tree by
> walks all the rtextents, and adding the duplicates:

Hmm.

So yes, add_rt_dup_extent seems to be called on an actual rtext, but
scan_bmapbt calls search_rt_dup_extent with what is clearly
a fsbno_t.   So something is fishy here for sure..

> So I think the reason why you've never seen false duplicates is that the
> rt_dup tree intervals measure rt extents, not rt blocks.  The units
> conversion in process_rt_rec_dups is correct.

Note that I don't see error with the patch either, so either way the
coverage isn't good enough..


  reply	other threads:[~2023-11-08 18:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-08 17:53 [PATCH] repair: fix process_rt_rec_dups Christoph Hellwig
2023-11-08 18:08 ` Darrick J. Wong
2023-11-08 18:21   ` Christoph Hellwig [this message]
2023-11-08 19:20     ` Darrick J. Wong
2023-11-09  4:44       ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231108182101.GA17121@lst.de \
    --to=hch@lst.de \
    --cc=djwong@kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.