From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH 3/4] btrfs-progs: map-logical: loosen the required trees to open the filesystem
Date: Thu, 12 Aug 2021 13:35:07 +0800 [thread overview]
Message-ID: <20210812053508.175737-4-wqu@suse.com> (raw)
In-Reply-To: <20210812053508.175737-1-wqu@suse.com>
For btrfs-map-logical, it only requires chunk tree to do the
logicla->physical mapping.
All othe trees are not really needed.
Loosen the required trees to make btrfs-map-logical to work better on
corrupted fs.
Signed-off-by: Qu Wenruo <wqu@suse.com>
---
btrfs-map-logical.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/btrfs-map-logical.c b/btrfs-map-logical.c
index 21f00fa20ce8..9f119d08bad8 100644
--- a/btrfs-map-logical.c
+++ b/btrfs-map-logical.c
@@ -261,7 +261,8 @@ int main(int argc, char **argv)
radix_tree_init();
cache_tree_init(&root_cache);
- root = open_ctree(dev, 0, 0);
+ root = open_ctree(dev, 0, OPEN_CTREE_PARTIAL |
+ OPEN_CTREE_NO_BLOCK_GROUPS);
if (!root) {
fprintf(stderr, "Open ctree failed\n");
free(output_file);
--
2.32.0
next prev parent reply other threads:[~2021-08-12 5:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-12 5:35 [PATCH 0/4] btrfs-progs: map-logical: remove the extent check Qu Wenruo
2021-08-12 5:35 ` [PATCH 1/4] btrfs-progs: map-logical: use sectorsize as default size Qu Wenruo
2021-08-12 5:35 ` [PATCH 2/4] btrfs-progs: map-logical: reject unaligned logical/bytes pair Qu Wenruo
2021-08-12 6:42 ` Nikolay Borisov
2021-08-12 5:35 ` Qu Wenruo [this message]
2021-08-12 6:41 ` [PATCH 3/4] btrfs-progs: map-logical: loosen the required trees to open the filesystem Nikolay Borisov
2021-08-12 5:35 ` [PATCH 4/4] btrfs-progs: map-logical: remove the extent item check 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=20210812053508.175737-4-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