All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: "Dāvis Mosāns" <davispuh@gmail.com>
To: Sebastian Roller <sebastian.roller@gmail.com>
Cc: Chris Murphy <lists@colorremedies.com>,
	Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: Re: All files are damaged after btrfs restore
Date: Wed, 17 Mar 2021 03:54:39 +0200	[thread overview]
Message-ID: <CAOE4rSxJdEB+==k3RpOPScrh8RXQ-+Q0cpR8AKSbv3DV8L=FTw@mail.gmail.com> (raw)
In-Reply-To: <CALS+qHMo-XVzXKEfd44E6BG7TPnWKT+r2m7p1wFtFs5XjQApEA@mail.gmail.com>

otrd., 2021. g. 23. febr., plkst. 17:51 — lietotājs Sebastian Roller
(<sebastian.roller@gmail.com>) rakstīja:
>
[...]
>
> root@hikitty:~$ install/btrfs-progs-5.9/btrfs check --readonly /dev/sdi1
> Opening filesystem to check...
> checksum verify failed on 99593231630336 found 000000B6 wanted 00000000
> checksum verify failed on 124762809384960 found 000000B6 wanted 00000000
> checksum verify failed on 124762809384960 found 000000B6 wanted 00000000
> checksum verify failed on 124762809384960 found 000000B6 wanted 00000000
> bad tree block 124762809384960, bytenr mismatch, want=124762809384960, have=0
> ERROR: failed to read block groups: Input/output error
> ERROR: cannot open file system

One possible reason could be that extent tree is corrupted. Right now
I'm dealing with such filesystem.
I wrote a patch that allows to read-only mount such filesystem
(assuming there's no other problems).

Currently none of btrfs tools work when extent tree is corrupted, but
for `btrfs check` this patch would allow it to go further. Only for
data recovery this isn't really that useful.

--- a/check/main.c
+++ b/check/main.c
@@ -10197,7 +10197,7 @@ static int cmd_check(const struct cmd_struct
*cmd, int argc, char **argv)
int qgroup_report = 0;
int qgroups_repaired = 0;
int qgroup_verify_ret;
-       unsigned ctree_flags = OPEN_CTREE_EXCLUSIVE;
+       unsigned ctree_flags = OPEN_CTREE_EXCLUSIVE |
OPEN_CTREE_NO_BLOCK_GROUPS;
int force = 0;

while(1) {

  parent reply	other threads:[~2021-03-17  1:55 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-23 15:45 All files are damaged after btrfs restore Sebastian Roller
2021-02-25  5:40 ` Chris Murphy
2021-02-25  5:52   ` Chris Murphy
2021-02-26 16:01     ` Sebastian Roller
2021-02-27  1:04       ` Chris Murphy
2021-03-04 15:34         ` Sebastian Roller
2021-03-05  3:01           ` Chris Murphy
2021-03-07 13:58             ` Sebastian Roller
2021-03-08  0:56               ` Chris Murphy
2021-03-09 17:02                 ` Sebastian Roller
2021-03-09 20:34                   ` Chris Murphy
2021-03-16  9:35                     ` Sebastian Roller
2021-03-16 19:34                       ` Chris Murphy
2021-03-17  1:38 ` Qu Wenruo
2021-03-17  2:59   ` Chris Murphy
2021-03-17  9:01     ` Sebastian Roller
2021-03-17  1:54 ` Dāvis Mosāns [this message]
2021-03-17 10:50   ` Sebastian Roller

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='CAOE4rSxJdEB+==k3RpOPScrh8RXQ-+Q0cpR8AKSbv3DV8L=FTw@mail.gmail.com' \
    --to=davispuh@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=lists@colorremedies.com \
    --cc=sebastian.roller@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.