public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: sandeen@sandeen.net, linux-xfs@vger.kernel.org
Subject: Re: [PATCH 5/5] xfs_repair: correctly detect partially written extents
Date: Wed, 28 Oct 2020 07:35:38 +0000	[thread overview]
Message-ID: <20201028073538.GG32068@infradead.org> (raw)
In-Reply-To: <160375514426.879169.1166063350727282652.stgit@magnolia>

On Mon, Oct 26, 2020 at 04:32:24PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
> 
> Recently, I was able to create a realtime file with a 16b extent size
> and the following data fork mapping:
> 
> data offset 0 startblock 144 (0/144) count 3 flag 0
> data offset 3 startblock 147 (0/147) count 3 flag 1
> data offset 6 startblock 150 (0/150) count 10 flag 0
> 
> Notice how we have a written extent, then an unwritten extent, and then
> another written extent.  The current code in process_rt_rec trips over
> that third extent, because repair only knows not to complain about inuse
> extents if the mapping was unwritten.
> 
> This loop logic is confusing, because it tries to do too many things.
> Move the phase3 and phase4 code to separate helper functions, then
> isolate the code that handles a mapping that starts in the middle of an
> rt extent so that it's clearer what's going on.
> 
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>

Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>

      parent reply	other threads:[~2020-10-28 21:51 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-26 23:31 [PATCH 0/5] xfsprogs: fixes for 5.10 Darrick J. Wong
2020-10-26 23:31 ` [PATCH 1/5] mkfs: allow users to specify rtinherit=0 Darrick J. Wong
2020-10-27  5:35   ` Allison Henderson
2020-10-27 17:22   ` Eric Sandeen
2020-10-27 17:24   ` [PATCH 1.5/5] mkfs: clarify valid "inherit" option values Eric Sandeen
2020-10-27 17:40     ` Darrick J. Wong
2020-10-27 17:49       ` Eric Sandeen
2020-10-28  7:32         ` Christoph Hellwig
2020-10-27 17:50     ` [PATCH 1.5/5 V2] " Eric Sandeen
2020-10-27 18:37       ` Darrick J. Wong
2020-10-28  7:32   ` [PATCH 1/5] mkfs: allow users to specify rtinherit=0 Christoph Hellwig
2020-10-26 23:32 ` [PATCH 2/5] xfs: remove unnecessary parameter from scrub_scan_estimate_blocks Darrick J. Wong
2020-10-27  5:35   ` Allison Henderson
2020-10-27 15:33     ` Darrick J. Wong
2020-10-29 18:33       ` Darrick J. Wong
2020-10-29 18:38         ` Allison Henderson
2020-10-28  7:33   ` Christoph Hellwig
2020-10-26 23:32 ` [PATCH 3/5] xfs_db: report ranges of invalid rt blocks Darrick J. Wong
2020-10-27  5:35   ` Allison Henderson
2020-10-28  7:33   ` Christoph Hellwig
2020-10-26 23:32 ` [PATCH 4/5] xfs_repair: skip the rmap and refcount btree checks when the levels are garbage Darrick J. Wong
2020-10-27  5:35   ` Allison Henderson
2020-10-28  7:34   ` Christoph Hellwig
2020-10-26 23:32 ` [PATCH 5/5] xfs_repair: correctly detect partially written extents Darrick J. Wong
2020-10-27  5:52   ` Allison Henderson
2020-10-28  7:35   ` Christoph Hellwig [this message]

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=20201028073538.GG32068@infradead.org \
    --to=hch@infradead.org \
    --cc=darrick.wong@oracle.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=sandeen@sandeen.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox