All of lore.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Benjamin Beichler <hadrian2002@googlemail.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: Chunk-Recovery fails with alignment error
Date: Mon, 11 Dec 2017 07:50:00 +0800	[thread overview]
Message-ID: <4b8d8cfe-de39-b587-075a-65a502bf5e08@gmx.com> (raw)
In-Reply-To: <CABi++uJD=XRVq-tUNZMep+GKFUKf8=okxrhhRGRo00aS=B9OOw@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 2162 bytes --]



On 2017年12月11日 05:16, Benjamin Beichler wrote:
> The patch let the chunk-recover be successful. But I'm no lucky man,
> the recovered chunk tree does not work or other metadata is also
> broken.
> 
> Mounting the system is not successful (dmesg):
> BTRFS critical (device dm-0): corrupt node, invalid item slot:
> block=16384, root=1, slot=0
> BTRFS error (device dm-0): failed to read chunk root
> BTRFS error (device dm-0): open_ctree failed

For this error, you could apply this diff to by-pass it:

------
diff --git a/fs/btrfs/tree-checker.c b/fs/btrfs/tree-checker.c
index ce4ed6ec8f39..355220e21c2e 100644
--- a/fs/btrfs/tree-checker.c
+++ b/fs/btrfs/tree-checker.c
@@ -413,12 +413,6 @@ int btrfs_check_node(struct btrfs_root *root,
struct extent_buffer *node)
                btrfs_node_key_to_cpu(node, &key, slot);
                btrfs_node_key_to_cpu(node, &next_key, slot + 1);

-               if (!bytenr) {
-                       generic_err(root, node, slot,
-                               "invalid NULL node pointer");
-                       ret = -EUCLEAN;
-                       goto out;
-               }
                if (!IS_ALIGNED(bytenr, root->fs_info->sectorsize)) {
                        generic_err(root, node, slot,
                        "unaligned pointer, have %llu should be aligned
to %u",
------

Thanks,
Qu

> 
> Therefore I tried a btrfs check --repair, this time without error:
> https://gist.github.com/anonymous/5cf7ad9e187032d2c94db4f91bb62c24
> 
> Then I tried btrfs check --init-extent-tree and this produces much
> output. I put the beginning into here:
> https://gist.github.com/anonymous/70e2482646a8235ee2327105d920dadd
> From a fast view, the messages keep to be similar to the last of the
> gist, but the messages in the beginning are not repeating. If it helps
> I have complete compressed log.
> 
> Then I tried a btrfs recover to get files, but for many files (also
> improtant data, but I filtered the output) I get outputs like in:
> https://gist.github.com/anonymous/1cc7f7ab5af33e76d0bf80960bb300eb
> 
> Any new suggestions?
> 


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 520 bytes --]

  parent reply	other threads:[~2017-12-10 23:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-05 19:22 Chunk-Recovery fails with alignment error Benjamin Beichler
2017-12-06  0:42 ` Qu Wenruo
     [not found]   ` <CABi++uKoMgi3WMw4z+kgJ1G2H_y_2e2Czg0OLwf18g9GmoU2Cg@mail.gmail.com>
     [not found]     ` <2f4346d5-ccb9-8de2-11d1-b270058723c1@gmx.com>
     [not found]       ` <CABi++uLD_2sXjuF6b0GKhWAX6fRRA0jqqUaujWP6_q+hiuvSXw@mail.gmail.com>
     [not found]         ` <b484d30c-f32d-78cf-7f07-b9cadb43a2d1@gmx.com>
2017-12-09 23:12           ` Benjamin Beichler
2017-12-10  0:29             ` Qu Wenruo
2017-12-10  0:33               ` Qu Wenruo
2017-12-10 21:16                 ` Benjamin Beichler
2017-12-10 23:32                   ` Qu Wenruo
2017-12-10 23:50                   ` Qu Wenruo [this message]
2017-12-12 16:07                     ` Benjamin Beichler
2017-12-06  6:08 ` Chris Murphy
2017-12-06  6:18   ` 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=4b8d8cfe-de39-b587-075a-65a502bf5e08@gmx.com \
    --to=quwenruo.btrfs@gmx.com \
    --cc=hadrian2002@googlemail.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 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.