From: Qu Wenruo <quwenruo@cn.fujitsu.com>
To: <linux-btrfs@vger.kernel.org>
Subject: [PATCH v3 00/10] Enhance btrfs-find-root and open_ctree() to provide better chance on damaged btrfs.
Date: Thu, 29 Jan 2015 17:07:15 +0800 [thread overview]
Message-ID: <1422522437-18886-1-git-send-email-quwenruo@cn.fujitsu.com> (raw)
The patchset first enhance btrfs-find-root command and then use it to
enhance open_ctree to provide a better chance to open heavily damaged
btrfs.
Patch 1~9 are all enhancement/cleanup for btrfs-find-root in the following
concepts.
1) Reuse existing infrastructure.
Use existing or slightly modified infrastructure other than
copy-n-modify codes.
2) Enhanced root search logic
The old root search logic have many problems, like ignore newer root
with smaller level and use wrong generation/level for searching.
The new logic will keep a per-generation record to deal the tree search,
and use different level/generation for different tree.
3) Make the find-root infrastructure exported to other commands.
Allow other btrfs-progs components to use find-root infrastructure, e.g.
open_ctree can use it if all primary/backup tree roots are corrupted.
Patch 10 is enhancement for open_ctree to use find-root infrastructure.
Also, since only 2 patches is modified(although other part is slightly
modified to match the change), to avoid mail bombing, I created the pull
request on github and only send the first 2 patches with cover-letter.
https://github.com/kdave/btrfs-progs/pull/5
---
changelog:
v2:
Split patch into logically independent parts.
v3:
Change fs_info->suppress_error to fs_info->suppress_tree_err to avoid
naming confusion.
Cleanup the check_tree_block() output and provide better output in
print_tree_block_err().
---
Qu Wenruo (10):
btrfs-progs: Cleanup check_tree_block() function and split the output
to print_tree_block_err() function.
btrfs-progs: Add support to suppress tree block csum error output.
btrfs-progs: Add new btrfs_open_ctree_flags CHUNK_ONLY.
btrfs-progs: Add new find-root.[ch] infrastructure.
btrfs-progs: Switch btrfs-find-root to use the new open_ctree flags.
btrfs-progs: Add better search generation judgment for
btrfs-find-root.
btrfs-progs: Switch btrfs-find-root to use the find-root
infrastructure.
btrfs-progs: Cleanup unneeded btrfs-find-root codes.
btrfs-progs: Add new option for btrfs-find-root to search through all
the metadata extents.
btrfs-progs: Allow open_ctree use backup tree root or search it
automatically if primary tree root is corrupted.
Documentation/btrfs-find-root.txt | 2 +
Makefile | 2 +-
btrfs-find-root.c | 379 +++++++++++++-------------------------
ctree.h | 2 +
disk-io.c | 172 ++++++++++++++---
disk-io.h | 10 +
find-root.c | 138 ++++++++++++++
find-root.h | 84 +++++++++
8 files changed, 514 insertions(+), 275 deletions(-)
create mode 100644 find-root.c
create mode 100644 find-root.h
--
2.2.2
next reply other threads:[~2015-01-29 9:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-29 9:07 Qu Wenruo [this message]
2015-01-29 9:07 ` [PATCH v3 01/10] btrfs-progs: Cleanup check_tree_block() function and split the output to print_tree_block_err() function Qu Wenruo
2015-01-29 9:07 ` [PATCH v3 02/10] btrfs-progs: Add support to suppress tree block csum error output Qu Wenruo
2015-02-10 14:48 ` [PATCH v3 00/10] Enhance btrfs-find-root and open_ctree() to provide better chance on damaged btrfs David Sterba
2015-02-11 0:33 ` Qu Wenruo
2015-02-11 17:52 ` David Sterba
2015-02-12 1:36 ` Qu Wenruo
2015-02-12 13:16 ` David Sterba
2015-02-13 1:34 ` 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=1422522437-18886-1-git-send-email-quwenruo@cn.fujitsu.com \
--to=quwenruo@cn.fujitsu.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;
as well as URLs for NNTP newsgroup(s).