All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anand Jain <Anand.Jain@oracle.com>
To: "haveaniceday@cv-sv.de" <haveaniceday@cv-sv.de>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: btrfsck crashes
Date: Wed, 11 Jul 2012 15:13:17 +0800	[thread overview]
Message-ID: <4FFD278D.20804@oracle.com> (raw)
In-Reply-To: <333721177.250041.1341918535801.JavaMail.open-xchange@email.1und1.de>



  If this is a deliberate corruption can you pls share the test-case ?
  if not have you tried mount with recovery and the scrub. ? scrub
  would be preferred choice over btrfsck.



On 10/07/12 19:08, haveaniceday@cv-sv.de wrote:
> This code should detect the problem without SIGSEGV but a Assertition.
> ...
> Csum didn't match
> btrfsck: btrfsck.c:1177: walk_down_tree: Assertion `!(1)' failed.
> Aborted
> ...
>
>
> --- btrfsck.c   2012-07-10 10:23:24.781622144 +0200
> +++ btrfsck.c   2012-07-10 12:59:00.120146266 +0200
> @@ -1173,7 +1173,7 @@
>                  WARN_ON(*level>= BTRFS_MAX_LEVEL);
>                  cur = path->nodes[*level];
>
> -               if (btrfs_header_level(cur) != *level)
> +               if (! cur || btrfs_header_level(cur) != *level)
>                          WARN_ON(1);
>
>                  if (path->slots[*level]>= btrfs_header_nritems(cur))
>
>   I tried to skip this error with the code below. The next errors reported are
> also below.
>
>
> --- btrfsck.c   2012-07-10 10:23:24.781622144 +0200
> +++ btrfsck.c   2012-07-10 12:36:51.995996771 +0200
> @@ -1173,8 +1173,13 @@
>                  WARN_ON(*level>= BTRFS_MAX_LEVEL);
>                  cur = path->nodes[*level];
>
> -               if (btrfs_header_level(cur) != *level)
> -                       WARN_ON(1);
> +               if (cur != 0 ) {
> +                       if ( btrfs_header_level(cur) != *level)
> +                               WARN_ON(1);
> +               }else {
> +                       fprintf(stderr, "CVCV path->nodes[*level] is 0!\n");
> +                       break;
> +               }
>
>                  if (path->slots[*level]>= btrfs_header_nritems(cur))
>                          break;
> @@ -1213,7 +1218,11 @@
>                  path->slots[*level] = 0;
>          }
>   out:
> +       if ( path->nodes[*level] != 0 ){
>          path->slots[*level] = btrfs_header_nritems(path->nodes[*level]);
> +       } else {
> +       path->slots[*level] = 0;
> +       }
>          return 0;
>   }
>
> Next errors I get are:
>
> ....
> checking fs roots
> checksum verify failed on 2327654400 wanted 73CDE79C found 72
> checksum verify failed on 2327654400 wanted 73CDE79C found 72
> checksum verify failed on 2327654400 wanted 73CDE79C found 72
> checksum verify failed on 2327654400 wanted 73CDE79C found 72
> Csum didn't match
> CVCV path->nodes[*level] is 0!
> root 5 inode 265 errors 2000
>          unresolved ref dir 2658782 index 3 namelen 12 name aquota.group filetype
> 0 error 3
>          unresolved ref dir 2914579 index 3 namelen 12 name aquota.group filetype
> 0 error 3
> root 5 inode 266 errors 2000
>          unresolved ref dir 2658782 index 4 namelen 11 name aquota.user filetype
> 0 error 3
>          unresolved ref dir 2914579 index 4 namelen 11 name aquota.user filetype
> 0 error 3
> root 5 inode 285 errors 2000
>          unresolved ref dir 2658783 index 3 namelen 3 name awk filetype 0 error 3
>          unresolved ref dir 2914580 index 3 namelen 3 name awk filetype 0 error 3
> root 5 inode 286 errors 2000
>          unresolved ref dir 2658783 index 16 namelen 3 name csh filetype 0 error
> 3
>          unresolved ref dir 2914580 index 16 namelen 3 name csh filetype 0 error
> 3
> root 5 inode 287 errors 2000
>          unresolved ref dir 2658783 index 27 namelen 13 name dnsdomainname
> filetype 0 error 3
>          unresolved ref dir 2914580 index 27 namelen 13 name dnsdomainname
> filetype 0 error 3
> root 5 inode 288 errors 2000
>          unresolved ref dir 2658783 index 28 namelen 10 name domainname filetype
> 0 error 3
>          unresolved ref dir 2914580 index 28 namelen 10 name domainname filetype
> 0 error 3
> root 5 inode 289 errors 2000
>          unresolved ref dir 2658783 index 34 namelen 2 name ex filetype 0 error 3
>          unresolved ref dir 2914580 index 34 namelen 2 name ex filetype 0 error 3
> root 5 inode 290 errors 2000
>          unresolved ref dir 2658783 index 48 namelen 2 name ip filetype 0 error 3
>          unresolved ref dir 2914580 index 48 namelen 2 name ip filetype 0 error 3
> root 5 inode 291 errors 2000
>          unresolved ref dir 2658783 index 54 namelen 3 name ksh filetype 0 error
> 3
>          unresolved ref dir 2914580 index 54 namelen 3 name ksh filetype 0 error
> 3
> root 5 inode 292 errors 2000
>          unresolved ref dir 2658783 index 63 namelen 4 name mail filetype 0 error
> 3
>          unresolved ref dir 2914580 index 63 namelen 4 name mail filetype 0 error
> 3
> ...
> --
> 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:[~2012-07-11  7:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-08 16:08 btrfsck crashes Christian Volkmann
2012-07-09  3:40 ` Anand Jain
2012-07-09 21:23   ` Christian Volkmann
2012-07-10  6:30     ` Anand Jain
2012-07-10  9:13       ` haveaniceday
2012-07-10 11:08         ` haveaniceday
2012-07-11  7:13           ` Anand Jain [this message]
2012-07-11  8:36             ` haveaniceday
2012-07-15 14:05               ` Martin Steigerwald
2012-07-12 19:08             ` Christian Volkmann

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=4FFD278D.20804@oracle.com \
    --to=anand.jain@oracle.com \
    --cc=haveaniceday@cv-sv.de \
    --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.