From: Nikolay Borisov <nborisov@suse.com>
To: Qu Wenruo <wqu@suse.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 3/4] btrfs-progs: map-logical: loosen the required trees to open the filesystem
Date: Thu, 12 Aug 2021 09:41:39 +0300 [thread overview]
Message-ID: <ea8a6615-6b68-deaf-4972-66563794e716@suse.com> (raw)
In-Reply-To: <20210812053508.175737-4-wqu@suse.com>
On 12.08.21 г. 8:35, Qu Wenruo wrote:
> 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);
nit: OPEN_CTREE_PARTIAL implies ignoring error when opening the csum and
extent tress, since those trees are opened via
setup_root_or_create_block. This tells me that
OPEN_CTREE_NO_BLOCK_GROUPS is redundant and can be removed and replaced
with simply OPEN_CTREE_PARTIAL.
> if (!root) {
> fprintf(stderr, "Open ctree failed\n");
> free(output_file);
>
next prev parent reply other threads:[~2021-08-12 6:41 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 ` [PATCH 3/4] btrfs-progs: map-logical: loosen the required trees to open the filesystem Qu Wenruo
2021-08-12 6:41 ` Nikolay Borisov [this message]
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=ea8a6615-6b68-deaf-4972-66563794e716@suse.com \
--to=nborisov@suse.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=wqu@suse.com \
/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