Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Cc: linux-btrfs@vger.kernel.org, Chris Mason <clm@fb.com>,
	Josef Bacik <jbacik@fb.com>, David Sterba <dsterba@suse.com>
Subject: Re: invalid files names, btrfs check can't repair it
Date: Sun, 14 Jan 2018 08:36:41 +0800	[thread overview]
Message-ID: <b0cc58c1-af7b-e4f7-2393-4d47a66bba59@gmx.com> (raw)
In-Reply-To: <20180113204114.g4jup552d5g5o5pa@breakpoint.cc>


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



On 2018年01月14日 04:41, Sebastian Andrzej Siewior wrote:
> On 2018-01-13 08:56:24 [+0800], Qu Wenruo wrote:
>> 'Btrfs check' output please.
> 
> ~# btrfs check --repair -p /dev/sdb4
> enabling repair mode
> Checking filesystem on /dev/sdb4
> UUID: b3bfb56e-d445-4335-93f0-c1fb2d1f6df1
> Fixed 0 roots.
> checking extents [o]
> No device size related problem found
> cache and super generation don't match, space cache will be invalidated
> checkingunresolved ref dir 57648595 index 435 namelen 40 name 2f3f379b2a3d7499471edb74869efe-1948311.d filetype 1 errors 80, filetype mismatch
>         unresolved ref dir 57648595 index 1137 namelen 39 name 454bf066ddfbf42e0f3b77ea71c82f-878732.o filetype 1 errors 100, name too long

Now we know the affected dir (ino 57648595).
> 
> checking csums
> checking root refs
> found 63691468800 bytes used, no error found
> total csum bytes: 61339388
> total tree bytes: 860536832
> total fs tree bytes: 688816128
> total extent tree bytes: 84545536
> btree space waste bytes: 224424238
> file data blocks allocated: 62890745856
>  referenced 62829219840
> ~# 
> 
>> And in fact, btrfs check --repair has the ability to move/re-link such
>> file and keeps its content, as long as there is any info found in
>> DIR_INDEX/DIR_ITEM/INODE_REF.
>>
>> If repair can't handle it, the output could help us to craft such case
>> and enhance btrfs-progs to repair it.
> 
> Is the output enough or do you want me to do more?

Still needs more. (and maybe even more depending on the output)

The original mode doesn't report error clear enough, so it would help if
--mode=lowmem can be used.

# btrfs check --mode=lowmem /dev/sdb4

And the tree dump of the affected dir inode would help too:

# btrfs inspect dump-tree /dev/sdb4 | grep -C 20 \(57648595

Thanks,
Qu

> 
>> Thanks,
>> Qu
> 
> Sebastian
> --
> 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
> 


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

  reply	other threads:[~2018-01-14  0:37 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-12 21:04 invalid files names, btrfs check can't repair it Sebastian Andrzej Siewior
2018-01-12 23:16 ` Timofey Titovets
2018-01-13  0:56 ` Qu Wenruo
2018-01-13 20:41   ` Sebastian Andrzej Siewior
2018-01-14  0:36     ` Qu Wenruo [this message]
2018-01-14 16:38       ` Sebastian Andrzej Siewior
2018-01-15  1:26         ` Qu Wenruo
2018-01-15  1:59           ` Lu Fengqi
2018-01-15  4:23             ` Qu Wenruo
2018-01-15 12:29               ` Sebastian Andrzej Siewior
2018-01-15  9:00           ` Sebastian Andrzej Siewior
2018-01-16  4:51             ` Qu Wenruo
2018-01-16  5:19               ` Qu Wenruo
2018-01-16 10:10                 ` Sebastian Andrzej Siewior
2018-01-16 10:22                   ` Qu Wenruo
2018-01-16 10:49                     ` Sebastian Andrzej Siewior
2018-01-16 11:20                       ` Qu Wenruo
2018-01-16 12:15                         ` Sebastian Andrzej Siewior
2018-01-16 12:28                           ` Qu Wenruo
2018-01-16 10:02               ` Sebastian Andrzej Siewior

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=b0cc58c1-af7b-e4f7-2393-4d47a66bba59@gmx.com \
    --to=quwenruo.btrfs@gmx.com \
    --cc=clm@fb.com \
    --cc=dsterba@suse.com \
    --cc=jbacik@fb.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=sebastian@breakpoint.cc \
    /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