Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Lu Fengqi <lufq.fnst@cn.fujitsu.com>
To: Qu Wenruo <quwenruo.btrfs@gmx.com>
Cc: <linux-btrfs@vger.kernel.org>
Subject: Re: invalid files names, btrfs check can't repair it
Date: Mon, 15 Jan 2018 09:59:52 +0800	[thread overview]
Message-ID: <20180115015952.GA523@fnst.localdomain> (raw)
In-Reply-To: <f242b71e-6539-3f60-314f-2a85efa5f26f@gmx.com>

On Mon, Jan 15, 2018 at 09:26:27AM +0800, Qu Wenruo wrote:
>
>
>On 2018年01月15日 00:38, Sebastian Andrzej Siewior wrote:
>> On 2018-01-14 08:36:41 [+0800], Qu Wenruo wrote:
>>> 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
>> 
>> ~# btrfs check --mode=lowmem /dev/sdb4
>> Checking filesystem on /dev/sdb4
>> UUID: b3bfb56e-d445-4335-93f0-c1fb2d1f6df1
>> checking extents
>> checking free space cache
>> Wanted bytes 4096, found 8192 for off 159178047488
>> Wanted bytes 1073725440, found 8192 for off 159178047488
>> cache appears valid but isn't 159178031104
>> ERROR: errors found in free space cache
>
>A new bug is exposed for lowmem mode.
>It doesn't check fs tree if space cache has any problem.
>

Just a reminder, the problem is not only for lowmem mode.

        ret = check_space_cache(root);
        err |= !!ret;
        if (ret) {
                if (btrfs_fs_compat_ro(info, FREE_SPACE_TREE))
                        error("errors found in free space tree");
                else
                        error("errors found in free space cache");
                goto out;
                ^^^
        }

        /*
         * We used to have to have these hole extents in between our real
         * extents so if we don't have this flag set we need to make sure there
         * are no gaps in the file extents for inodes, otherwise we can just
         * ignore it when this happens.
         */
        no_holes = btrfs_fs_incompat(root->fs_info, NO_HOLES);
        ret = do_check_fs_roots(info, &root_cache);
              ^^^
        err |= !!ret;
        if (ret) {
                error("errors found in fs roots");
                goto out;
        }

-- 
Thanks,
Lu

>> found 63691210752 bytes used, error(s) found
>> total csum bytes: 61339388
>> total tree bytes: 860540928
>> total fs tree bytes: 688816128
>> total extent tree bytes: 84549632
>> btree space waste bytes: 224428280
>> file data blocks allocated: 62890483712
>>  referenced 62828957696
>> 



  reply	other threads:[~2018-01-15  2:00 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
2018-01-14 16:38       ` Sebastian Andrzej Siewior
2018-01-15  1:26         ` Qu Wenruo
2018-01-15  1:59           ` Lu Fengqi [this message]
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=20180115015952.GA523@fnst.localdomain \
    --to=lufq.fnst@cn.fujitsu.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=quwenruo.btrfs@gmx.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox