linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: telsch <telsch@gmx.de>
To: Qu Wenruo <quwenruo.btrfs@gmx.com>, linux-btrfs@vger.kernel.org
Subject: Re: tree-checker read time corruption
Date: Thu, 13 Feb 2020 15:02:22 +0100	[thread overview]
Message-ID: <d250e7c2-76d4-1369-e440-c72370035842@gmx.de> (raw)
In-Reply-To: <5037cdd7-8d10-bc2b-195d-59c5929c0c50@gmx.com>



On 2/13/20 1:24 AM, Qu Wenruo wrote:
>
>
> On 2020/2/12 下午10:20, telsch wrote:
>>
>>
>> On 2/12/20 1:41 AM, Qu Wenruo wrote:
>>>
>>>
>>> On 2020/2/11 下午10:17, telsch wrote:
>>>> Dear devs,
>>>>
>>>>
>>>>
>>>> after upgrading from kernel 4.19.101 to 5.5.2 i got read time tree block
>>>> error as
>>>>
>>>> described here:
>>>>
>>>>       https://btrfs.wiki.kernel.org/index.php/Tree-checker#For_end_users
>>>>
>>>>
>>>>
>>>> Working with kernel 4.19.101:
>>>>
>>>>
>>>>
>>>> Linux Arch 4.19.101-1-lts #1 SMP Sat, 01 Feb 2020 16:35:36 +0000 x86_64
>>>> GNU/Linux
>>>>
>>>>
>>>>
>>>> btrfs --version
>>>>
>>>> btrfs-progs v5.4
>>>>
>>>>
>>>>
>>>> btrfs fi show
>>>>
>>>> Label: none  uuid: 56e753f4-1346-49ad-a34f-e93a0235b82a
>>>>
>>>>           Total devices 1 FS bytes used 92.54GiB
>>>>
>>>>           devid    1 size 95.14GiB used 95.14GiB path /dev/mapper/home
>>>>
>>>>
>>>>
>>>> btrfs fi df /home
>>>>
>>>> Data, single: total=94.11GiB, used=91.95GiB
>>>>
>>>> System, single: total=31.00MiB, used=12.00KiB
>>>>
>>>> Metadata, single: total=1.00GiB, used=599.74MiB
>>>>
>>>> GlobalReserve, single: total=199.32MiB, used=0.00B
>>>>
>>>>
>>>>
>>>> After upgrading to kernel 5.5.2:
>>>>
>>>>
>>>>
>>>> [   13.413025] BTRFS: device fsid 56e753f4-1346-49ad-a34f-e93a0235b82a
>>>> devid 1 transid 468295 /dev/dm-1 scanned by systemd-udevd (417)
>>>>
>>>> [   13.589952] BTRFS info (device dm-1): force zstd compression, level 3
>>>>
>>>> [   13.589956] BTRFS info (device dm-1): disk space caching is enabled
>>>>
>>>> [   13.594707] BTRFS info (device dm-1): bdev /dev/mapper/home errs: wr
>>>> 0, rd 47, flush 0, corrupt 0, gen 0
>>>>
>>>> [   13.622912] BTRFS info (device dm-1): enabling ssd optimizations
>>>>
>>>> [   13.624300] BTRFS critical (device dm-1): corrupt leaf: root=5
>>>> block=122395779072 slot=10 ino=265, invalid inode generation: has
>>>> 18446744073709551492 expect [0, 468296]
>>>
>>> An older kernel caused underflow/garbage generation.
>>> Much strict tree checker is detecting it and rejecting the tree block to
>>> prevent further corruption.
>>>
>>> It can be fixed in by btrfs-progs v5.4 and later, by using 'btrfs check
>>> --repair'
>>>
>>> Early btrfs-progs can't detect nor fix it.
>>>
>>> Thanks,
>>> Qu
>>>
>>
>> As you suggest booting to kernel 5.5.3 with btrfs-progs v5.4 and run
>> 'btrfs check --repair'. But didn't fix this error.
>>
>> mount: /home: can't read superblock on /dev/mapper/home.
>> [  325.121475] BTRFS info (device dm-1): force zstd compression, level 3
>> [  325.121482] BTRFS info (device dm-1): disk space caching is enabled
>> [  325.126234] BTRFS info (device dm-1): bdev /dev/mapper/home errs: wr
>> 0, rd 47, flush 0, corrupt 0, gen 0
>> [  325.143521] BTRFS info (device dm-1): enabling ssd optimizations
>> [  325.146138] BTRFS critical (device dm-1): corrupt leaf: root=5
>> block=122395779072 slot=10 ino=265, invalid inode generation: has
>> 18446744073709551492 expect [0, 469820]
>> [  325.148637] BTRFS error (device dm-1): block=122395779072 read time
>> tree block corruption detected
>
> According to the repair log, btrfs-progs doesn't detect it at all.
> Thus I'm not sure if it's a bug in btrfs-progs or it's just not newer
> enough.
>
> Anyway, you can delete inode 265 manually using older kernel.
>
> Thanks,
> Qu

Thanks for support. Deleting inode 265 manually fixed this mount issue
with kernel >= 5.2 for me.

>>
>>>>
>>>> [   13.624381] BTRFS error (device dm-1): block=122395779072 read time
>>>> tree block corruption detected
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Booting from 4.19 kernel can mount fs again.
>>>
>

  reply	other threads:[~2020-02-13 14:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-11 14:17 tree-checker read time corruption telsch
2020-02-12  0:41 ` Qu Wenruo
2020-02-12 14:20   ` telsch
2020-02-13  0:24     ` Qu Wenruo
2020-02-13 14:02       ` telsch [this message]
2020-02-13 14:14         ` Holger Hoffstätte

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=d250e7c2-76d4-1369-e440-c72370035842@gmx.de \
    --to=telsch@gmx.de \
    --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;
as well as URLs for NNTP newsgroup(s).