All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
To: Michael Witten <mfwitten@gmail.com>
Cc: Shilong Wang <wangshilong1991@gmail.com>, <linux-btrfs@vger.kernel.org>
Subject: Re: [Help] Errors found in extent allocation tree or chunk allocation
Date: Wed, 2 Apr 2014 08:53:09 +0800	[thread overview]
Message-ID: <533B5F75.3090304@cn.fujitsu.com> (raw)
In-Reply-To: <5a201e76eb0545a290305d2e62bfcd28-mfwitten@gmail.com>

Hello Michael,

On 04/02/2014 03:26 AM, Michael Witten wrote:
> On Tue, 1 Apr 2014 07:15:47 +0800, Shilong Wang wrote:
>
>> hello, recently, i was working on btrfsck repair. i post some
>> patches to make btrfsck to rebuild extent tree with snapshots.
>> you can pull code from david latest branch and have a try with
>> btrfsck --init-extent-tree.
> Fortunately, the `btrfs balance' command solved the issue for me:
>
>    http://mid.gmane.org/<8e4932bb29f743419660da1846c2363b-mfwitten@gmail.com>
>
> However, I did notice `--init-extent-tree' when trying to figure
> out what I might do to fix my troubles; however, I was uncertain
> about exactly what it would do.
>
> According to `man btrfsck':
>
>    --init-csum-tree
>         create a new CRC tree.
>
>    --init-extent-tree
>         create a new extent tree.
>
> These sound potentially destructive, so I was afraid to use them;
> what exactly does it mean to create a new tree? After your email,
> I assume each action creates a new tree that is populated from the
> data in the corresponding old tree.

We may have a totally broken Extent tree, then you could not even
mount your filesystem anymore.

'--init-extent-tree' will recreate a new tree and then re-insert 
everything according to other fs/file tree.

>
> Also, you wrote:
>
>> rebuild extent tree with snapshots
> Do you mean to say that your patches handle the previously unhandled
> case in which both of the following are true?

Previouly, '--init-extent-tree' did not handle it properly if there is 
snapshots in the filesystem.

Thanks,
Wang
>
>    * There are snapshots in the file system.
>    * The extent tree needs to be rebuilt.
>
> Thanks!
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>


      reply	other threads:[~2014-04-02  0:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-31 17:39 [Help] Errors found in extent allocation tree or chunk allocation Michael Witten
2014-03-31 19:45 ` Duncan
2014-03-31 20:33   ` Michael Witten
2014-03-31 21:10     ` Duncan
2014-03-31 21:16     ` Duncan
2014-03-31 22:51       ` Michael Witten
2014-04-01 19:05     ` Michael Witten
2014-04-02  7:27       ` Duncan
     [not found] ` <CAP9B-Qmy4NgzRPpApM+Pn7tjhu6Z-cBtz99kgC+2rYu9+o9PCQ@mail.gmail.com>
2014-04-01 19:26   ` Michael Witten
2014-04-02  0:53     ` Wang Shilong [this message]

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=533B5F75.3090304@cn.fujitsu.com \
    --to=wangsl.fnst@cn.fujitsu.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=mfwitten@gmail.com \
    --cc=wangshilong1991@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.