Hi, I recently got the following error in dmesg while taking an
incremental backup of my data:

[26876.491167] BTRFS critical (device dm-0): corrupt leaf: root=258
block=739531833344 slot=0 ino=19366566, invalid mode: has 00 expect
valid S_IF* bit(s)
[26876.491171] BTRFS error (device dm-0): block=739531833344 read time
tree block corruption detected

It is triggered whenever stat() is called on one of these files:
$ ls -lR >/dev/null
ls: cannot access './<redacted a>/2018-05-31.220504+1000AEST.html':
Input/output error
ls: cannot access './<redacted b>/2018-05-31.200836+1000AEST.html':
Input/output error
ls: cannot access './<redacted c>/2018-05-31.201834+1000AEST.html':
Input/output error
ls: cannot access './<redacted d>/2018-05-31.222947+1000AEST.html':
Input/output error

https://btrfs.wiki.kernel.org/index.php/Tree-checker#How_to_handle_such_error
tells me to post on this mailing list upon getting such an error, so
here I am.

What's happened? How can I fix this? Should I just restore from backup?

Various diagnostic command outputs:

$ uname -a
Linux home.kota.moe 5.2.0-3-rt-amd64 #1 SMP PREEMPT RT Debian 5.2.17-1
(2019-09-26) x86_64 GNU/Linux
$ btrfs --version
btrfs-progs v5.2.1
$ sudo btrfs filesystem show
Label: none  uuid: 909c3fad-bc84-4b62-8090-ad1ae46f925e
Total devices 2 FS bytes used 191.27GiB
devid    1 size 200.00GiB used 197.03GiB path /dev/mapper/home-dom0
devid    2 size 200.00GiB used 197.03GiB path /dev/mapper/home-dom0--mirror
$ sudo btrfs filesystem df .
Data, RAID1: total=193.00GiB, used=188.50GiB
System, RAID1: total=32.00MiB, used=48.00KiB
Metadata, RAID1: total=4.00GiB, used=2.77GiB
GlobalReserve, single: total=385.31MiB, used=0.00B
$ diff -u <(sudo btrfs ins dump-tree -b 739531833344 /dev/home/dom0)
<(sudo btrfs ins dump-tree -b 739531833344 /dev/home/dom0-mirror)
$ sudo btrfs ins dump-tree -b 739531833344 /dev/home/dom0
(See attached file)

Attachment: dump-tree-dom0
Description: Binary data

Reply via email to