From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH 0/3] btrfs-progs: tune: run "btrfs check" before and after full fs conversion
Date: Mon, 4 Dec 2023 17:26:26 +1030 [thread overview]
Message-ID: <cover.1701672971.git.wqu@suse.com> (raw)
There are already two reports about some filesystem corruption after
converting to block group tree.
So far we don't have any concrete evidence that block group tree
conversion is the cause yet, but there are some possible cases like a
unhealthy fs in the first place which can screw up such full fs
conversion.
To rule out the possibility, let's run "btrfs check" both before and
after a full fs conversion run (*), so that we make sure the fs is fine
and stays fine during the conversion.
*: For now this includes the following operations:
- convert to block group tree
- convert to extent tree
- convert checksum type
For UUID change (not the metadata uuid one), although we're rewriting
the whole fs, we are doing it in-place, thus not much can go wrong,
unlike the above 3, which relies one full transactional protection.
Other operations are just changing a super block flag.
The first patch is removing inode cache clearing from btrfs check, as
we're exporting btrfs-check now, those deprecated functionality is no
longer worthy maintaining in "btrfs check". (And it's still maintained,
although only through "btrfs rescue").
The second patch would export the full "btrfs check" functionality
through btrfs_check() function, with btrfs_check_options structure to
toggle all the options.
Finally the last patch is doing all the extra checks for btrfstune.
Qu Wenruo (3):
btrfs-progs: check: remove inode cache clearing functionality
btrfs-progs: check: export a dedicated btrfs_check() function
btrfs-progs: tune: add fsck runs before and after a full conversion
Makefile | 3 +-
check/main.c | 999 +++++++++---------
common/utils.c | 18 +
common/utils.h | 41 +
.../ino-cache-enabled.raw.xz | Bin
.../060-ino-cache-clean}/test.sh | 2 +-
tune/main.c | 55 +
7 files changed, 614 insertions(+), 504 deletions(-)
rename tests/{fsck-tests/046-ino-cache-clean => misc-tests/060-ino-cache-clean}/ino-cache-enabled.raw.xz (100%)
rename tests/{fsck-tests/046-ino-cache-clean => misc-tests/060-ino-cache-clean}/test.sh (97%)
--
2.43.0
next reply other threads:[~2023-12-04 6:56 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-04 6:56 Qu Wenruo [this message]
2023-12-04 6:56 ` [PATCH 1/3] btrfs-progs: check: remove inode cache clearing functionality Qu Wenruo
2023-12-05 16:47 ` David Sterba
2023-12-04 6:56 ` [PATCH 2/3] btrfs-progs: check: export a dedicated btrfs_check() function Qu Wenruo
2023-12-04 6:56 ` [PATCH 3/3] btrfs-progs: tune: add fsck runs before and after a full conversion Qu Wenruo
2023-12-04 9:44 ` Su Yue
2023-12-04 10:11 ` l
2023-12-04 10:22 ` Qu Wenruo
2023-12-05 16:46 ` David Sterba
2023-12-05 21:33 ` Qu Wenruo
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=cover.1701672971.git.wqu@suse.com \
--to=wqu@suse.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