public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Josef Bacik <josef@toxicpanda.com>
To: kernel-team@fb.com, linux-btrfs@vger.kernel.org
Subject: [PATCH 0/3][v2] Fix btrfs check handling of missing file extents
Date: Tue,  4 Feb 2020 09:32:39 -0500	[thread overview]
Message-ID: <20200204143243.696500-1-josef@toxicpanda.com> (raw)

v1->v2:
- While running full xfstests with the new progs I noticed failures for tests
  that should have been fine.  Turns out our check will not wander down shared
  blocks, instead it'll merge inode records, which makes setting the
  rec->extent_start to key.offset very important.  So instead fix the problem by
  checking for the start gap once we're done doing all the merging.
- Added a third patch to make the hole error message actually correct when we
  have a gap at the beginning.

--------------- Original message ------------------

While adding an xfstest for the missing file extent problem I fixed with the
series

  btrfs: fix hole corruption issue with !NO_HOLES

I was failing to fail my test without my patches, despite the file system being
actually wrong.

It turns out because the normal check mode sets its expected start to the first
file extent it finds, instead of 0.  This means it misses any gaps between 0 and
the first file extent item in the inode.

The lowmem check does not have this issue, instead it doesn't take into account
the isize of the inode, so improperly fails when we have a gap but that is
outside of the isize.  I fixed this as well.

With these patches we're able to properly find another set of corruptions, and
now my xfstest acts sanely.  Thanks,

Josef


             reply	other threads:[~2020-02-04 14:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-04 14:32 Josef Bacik [this message]
2020-02-04 14:32 ` [PATCH 1/3] btrfs-progs: fix check to catch gaps at the start of the file Josef Bacik
2020-02-04 14:32 ` [PATCH 2/3] btrfs-progs: fix lowmem check's handling of holes Josef Bacik
2020-02-04 14:32 ` [PATCH 3/3] btrfs-progs: fix hole error output in fsck Josef Bacik

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=20200204143243.696500-1-josef@toxicpanda.com \
    --to=josef@toxicpanda.com \
    --cc=kernel-team@fb.com \
    --cc=linux-btrfs@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox