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: Wed, 12 Feb 2020 15:20:21 +0100	[thread overview]
Message-ID: <14db7da5-dc42-90e6-0743-b656ff42a976@gmx.de> (raw)
In-Reply-To: <e35d0318-4d3e-50ce-55b1-178e235e89d7@gmx.com>

[-- Attachment #1: Type: text/plain, Size: 3088 bytes --]



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

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

[-- Attachment #2: check_repair.log --]
[-- Type: text/x-log, Size: 15445 bytes --]

enabling repair mode
WARNING:

	Do not use --repair unless you are advised to do so by a developer
	or an experienced user, and then only after having accepted that no
	fsck can successfully repair all types of filesystem corruption. Eg.
	some software or hardware bugs can fatally damage a volume.
	The operation will start in 10 seconds.
	Use Ctrl-C to stop it.
10 9 8 7 6 5 4 3 2 1[1/7] checking root items
Fixed 0 roots.
[2/7] checking extents
[3/7] checking free space cache
[4/7] checking fs roots
[5/7] checking only csums items (without verifying data)
there are no extents for csum range 0-69632
csum exists for 0-69632 but there is no extent record
there are no extents for csum range 37908480-37912576
csum exists for 37908480-37912576 but there is no extent record
there are no extents for csum range 37916672-38178816
csum exists for 37916672-38178816 but there is no extent record
there are no extents for csum range 38182912-39735296
csum exists for 38182912-39735296 but there is no extent record
there are no extents for csum range 39751680-39890944
csum exists for 39751680-39890944 but there is no extent record
there are no extents for csum range 39895040-40103936
csum exists for 39895040-40103936 but there is no extent record
there are no extents for csum range 40108032-40284160
csum exists for 40108032-40284160 but there is no extent record
there are no extents for csum range 40288256-40697856
csum exists for 40288256-40697856 but there is no extent record
there are no extents for csum range 40706048-40726528
csum exists for 40706048-40726528 but there is no extent record
there are no extents for csum range 40730624-40742912
csum exists for 40730624-40742912 but there is no extent record
there are no extents for csum range 40747008-40751104
csum exists for 40747008-40751104 but there is no extent record
there are no extents for csum range 40755200-41033728
csum exists for 40755200-41033728 but there is no extent record
there are no extents for csum range 41037824-41148416
csum exists for 41037824-41148416 but there is no extent record
there are no extents for csum range 41152512-41164800
csum exists for 41152512-41164800 but there is no extent record
there are no extents for csum range 41168896-41218048
csum exists for 41168896-41218048 but there is no extent record
there are no extents for csum range 41222144-42913792
csum exists for 41222144-42913792 but there is no extent record
there are no extents for csum range 42917888-43802624
csum exists for 42917888-43802624 but there is no extent record
there are no extents for csum range 43806720-43929600
csum exists for 43806720-43929600 but there is no extent record
there are no extents for csum range 43933696-49299456
csum exists for 43933696-49299456 but there is no extent record
there are no extents for csum range 49303552-49340416
csum exists for 49303552-49340416 but there is no extent record
there are no extents for csum range 49344512-49385472
csum exists for 49344512-49385472 but there is no extent record
there are no extents for csum range 49389568-49397760
csum exists for 49389568-49397760 but there is no extent record
there are no extents for csum range 49401856-49422336
csum exists for 49401856-49422336 but there is no extent record
there are no extents for csum range 49426432-49463296
csum exists for 49426432-49463296 but there is no extent record
there are no extents for csum range 49467392-49471488
csum exists for 49467392-49471488 but there is no extent record
there are no extents for csum range 49479680-49549312
csum exists for 49479680-49549312 but there is no extent record
there are no extents for csum range 49553408-49565696
csum exists for 49553408-49565696 but there is no extent record
there are no extents for csum range 49569792-49688576
csum exists for 49569792-49688576 but there is no extent record
there are no extents for csum range 49692672-49717248
csum exists for 49692672-49717248 but there is no extent record
there are no extents for csum range 49721344-49766400
csum exists for 49721344-49766400 but there is no extent record
there are no extents for csum range 49774592-49790976
csum exists for 49774592-49790976 but there is no extent record
there are no extents for csum range 49795072-49885184
csum exists for 49795072-49885184 but there is no extent record
there are no extents for csum range 49889280-49950720
csum exists for 49889280-49950720 but there is no extent record
there are no extents for csum range 49954816-50176000
csum exists for 49954816-50176000 but there is no extent record
there are no extents for csum range 50180096-50315264
csum exists for 50180096-50315264 but there is no extent record
there are no extents for csum range 50319360-50384896
csum exists for 50319360-50384896 but there is no extent record
there are no extents for csum range 50388992-50454528
csum exists for 50388992-50454528 but there is no extent record
there are no extents for csum range 50462720-50495488
csum exists for 50462720-50495488 but there is no extent record
there are no extents for csum range 50499584-50593792
csum exists for 50499584-50593792 but there is no extent record
there are no extents for csum range 50597888-50610176
csum exists for 50597888-50610176 but there is no extent record
there are no extents for csum range 50622464-50659328
csum exists for 50622464-50659328 but there is no extent record
there are no extents for csum range 50663424-50831360
csum exists for 50663424-50831360 but there is no extent record
there are no extents for csum range 50835456-50909184
csum exists for 50835456-50909184 but there is no extent record
there are no extents for csum range 50913280-51499008
csum exists for 50913280-51499008 but there is no extent record
there are no extents for csum range 51503104-51523584
csum exists for 51503104-51523584 but there is no extent record
there are no extents for csum range 51527680-51896320
csum exists for 51527680-51896320 but there is no extent record
there are no extents for csum range 51900416-51924992
csum exists for 51900416-51924992 but there is no extent record
there are no extents for csum range 51929088-52924416
csum exists for 51929088-52924416 but there is no extent record
there are no extents for csum range 52928512-52961280
csum exists for 52928512-52961280 but there is no extent record
there are no extents for csum range 52965376-53174272
csum exists for 52965376-53174272 but there is no extent record
there are no extents for csum range 53178368-53477376
csum exists for 53178368-53477376 but there is no extent record
there are no extents for csum range 53481472-53485568
csum exists for 53481472-53485568 but there is no extent record
there are no extents for csum range 53489664-53944320
csum exists for 53489664-53944320 but there is no extent record
there are no extents for csum range 53948416-54038528
csum exists for 53948416-54038528 but there is no extent record
there are no extents for csum range 54042624-55513088
csum exists for 54042624-55513088 but there is no extent record
there are no extents for csum range 55517184-55521280
csum exists for 55517184-55521280 but there is no extent record
there are no extents for csum range 55525376-55730176
csum exists for 55525376-55730176 but there is no extent record
there are no extents for csum range 55734272-55885824
csum exists for 55734272-55885824 but there is no extent record
there are no extents for csum range 55894016-55939072
csum exists for 55894016-55939072 but there is no extent record
there are no extents for csum range 55943168-56045568
csum exists for 55943168-56045568 but there is no extent record
there are no extents for csum range 56049664-56066048
csum exists for 56049664-56066048 but there is no extent record
there are no extents for csum range 56070144-56078336
csum exists for 56070144-56078336 but there is no extent record
there are no extents for csum range 56082432-56111104
csum exists for 56082432-56111104 but there is no extent record
there are no extents for csum range 56119296-56193024
csum exists for 56119296-56193024 but there is no extent record
there are no extents for csum range 56197120-56221696
csum exists for 56197120-56221696 but there is no extent record
there are no extents for csum range 56225792-56352768
csum exists for 56225792-56352768 but there is no extent record
there are no extents for csum range 56356864-56627200
csum exists for 56356864-56627200 but there is no extent record
there are no extents for csum range 56631296-56668160
csum exists for 56631296-56668160 but there is no extent record
there are no extents for csum range 56672256-56717312
csum exists for 56672256-56717312 but there is no extent record
there are no extents for csum range 56721408-56762368
csum exists for 56721408-56762368 but there is no extent record
there are no extents for csum range 56766464-56770560
csum exists for 56766464-56770560 but there is no extent record
there are no extents for csum range 56774656-56786944
csum exists for 56774656-56786944 but there is no extent record
there are no extents for csum range 56791040-56836096
csum exists for 56791040-56836096 but there is no extent record
there are no extents for csum range 56840192-57008128
csum exists for 56840192-57008128 but there is no extent record
there are no extents for csum range 57012224-59416576
csum exists for 57012224-59416576 but there is no extent record
there are no extents for csum range 59420672-59424768
csum exists for 59420672-59424768 but there is no extent record
there are no extents for csum range 59428864-59543552
csum exists for 59428864-59543552 but there is no extent record
there are no extents for csum range 59547648-59564032
csum exists for 59547648-59564032 but there is no extent record
there are no extents for csum range 59568128-59777024
csum exists for 59568128-59777024 but there is no extent record
there are no extents for csum range 59781120-59826176
csum exists for 59781120-59826176 but there is no extent record
there are no extents for csum range 59830272-60186624
csum exists for 59830272-60186624 but there is no extent record
there are no extents for csum range 60190720-60203008
csum exists for 60190720-60203008 but there is no extent record
there are no extents for csum range 60207104-60534784
csum exists for 60207104-60534784 but there is no extent record
there are no extents for csum range 60538880-60620800
csum exists for 60538880-60620800 but there is no extent record
there are no extents for csum range 60624896-60833792
csum exists for 60624896-60833792 but there is no extent record
there are no extents for csum range 60846080-61054976
csum exists for 60846080-61054976 but there is no extent record
there are no extents for csum range 61059072-61267968
csum exists for 61059072-61267968 but there is no extent record
there are no extents for csum range 61272064-61407232
csum exists for 61272064-61407232 but there is no extent record
there are no extents for csum range 61411328-61435904
csum exists for 61411328-61435904 but there is no extent record
there are no extents for csum range 61440000-61825024
csum exists for 61440000-61825024 but there is no extent record
there are no extents for csum range 61829120-61911040
csum exists for 61829120-61911040 but there is no extent record
there are no extents for csum range 61915136-62087168
csum exists for 61915136-62087168 but there is no extent record
there are no extents for csum range 62091264-63688704
csum exists for 62091264-63688704 but there is no extent record
there are no extents for csum range 63692800-63709184
csum exists for 63692800-63709184 but there is no extent record
there are no extents for csum range 63713280-63823872
csum exists for 63713280-63823872 but there is no extent record
there are no extents for csum range 63827968-63877120
csum exists for 63827968-63877120 but there is no extent record
there are no extents for csum range 63881216-64843776
csum exists for 63881216-64843776 but there is no extent record
there are no extents for csum range 64847872-64851968
csum exists for 64847872-64851968 but there is no extent record
there are no extents for csum range 64860160-64888832
csum exists for 64860160-64888832 but there is no extent record
there are no extents for csum range 64892928-64999424
csum exists for 64892928-64999424 but there is no extent record
there are no extents for csum range 65003520-65204224
csum exists for 65003520-65204224 but there is no extent record
there are no extents for csum range 65208320-65339392
csum exists for 65208320-65339392 but there is no extent record
there are no extents for csum range 65343488-65527808
csum exists for 65343488-65527808 but there is no extent record
there are no extents for csum range 65531904-65892352
csum exists for 65531904-65892352 but there is no extent record
there are no extents for csum range 65896448-65953792
csum exists for 65896448-65953792 but there is no extent record
there are no extents for csum range 65957888-65978368
csum exists for 65957888-65978368 but there is no extent record
there are no extents for csum range 65982464-66056192
csum exists for 65982464-66056192 but there is no extent record
there are no extents for csum range 66060288-66166784
csum exists for 66060288-66166784 but there is no extent record
there are no extents for csum range 66170880-66379776
csum exists for 66170880-66379776 but there is no extent record
there are no extents for csum range 66383872-66392064
csum exists for 66383872-66392064 but there is no extent record
there are no extents for csum range 66396160-66441216
csum exists for 66396160-66441216 but there is no extent record
there are no extents for csum range 66445312-66494464
csum exists for 66445312-66494464 but there is no extent record
there are no extents for csum range 66498560-66514944
csum exists for 66498560-66514944 but there is no extent record
there are no extents for csum range 66519040-66543616
csum exists for 66519040-66543616 but there is no extent record
there are no extents for csum range 66547712-66560000
csum exists for 66547712-66560000 but there is no extent record
there are no extents for csum range 66564096-66592768
csum exists for 66564096-66592768 but there is no extent record
there are no extents for csum range 66596864-66789376
csum exists for 66596864-66789376 but there is no extent record
there are no extents for csum range 66793472-66969600
csum exists for 66793472-66969600 but there is no extent record
there are no extents for csum range 66973696-67018752
csum exists for 66973696-67018752 but there is no extent record
there are no extents for csum range 67022848-67072000
csum exists for 67022848-67072000 but there is no extent record
there are no extents for csum range 67076096-67108864
csum exists for 67076096-67108864 but there is no extent record
ERROR: errors found in csum tree
[6/7] checking root refs
[7/7] checking quota groups skipped (not enabled on this FS)

Starting repair.
Opening filesystem to check...
Checking filesystem on /dev/mapper/home
UUID: 56e753f4-1346-49ad-a34f-e93a0235b82a
No device size related problem found
cache and super generation don't match, space cache will be invalidated
found 98139639936 bytes used, error(s) found
total csum bytes: 95137100
total tree bytes: 576499712
total fs tree bytes: 370470912
total extent tree bytes: 79908864
btree space waste bytes: 139168270
file data blocks allocated: 262370742272
 referenced 212897402880

  reply	other threads:[~2020-02-12 14:20 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 [this message]
2020-02-13  0:24     ` Qu Wenruo
2020-02-13 14:02       ` telsch
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=14db7da5-dc42-90e6-0743-b656ff42a976@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).