On 2020/5/21 上午9:34, Pierre Abbat wrote:
> I am not on the list, so please copy me.
Sorry for the late reply, as it takes me extra time handling the
btrfs-image bug which delayed me quite a lot.
The good news is, the bug of dead looping is already fixed (or at least
can be rejected gracefully) in latest upstream kernel.
>
> What does "looping too much" mean?
This is caused by corrupted extent tree. As I mentioned, there is a bit
flip in extent tree, making reference count of one extent jumped from
0x1 to 0x200001.
And then since your fs has dirty log tree, during log replay btrfs is
trying to locate the non-existing 0x200000 extents refs, leading to the
dead loop.
>
> phma@puma:~$ uname -a
> Linux puma 5.3.0-7625-generic #27~1576774560~19.10~f432cd8-Ubuntu SMP Thu Dec
In v5.4, we introduced new extent item check, f82d1c7ca8ae ("btrfs:
tree-checker: Add EXTENT_ITEM and METADATA_ITEM check"), which will
rejects such obviously bad extent item, and avoid falling into the dead
loop.
So you're just one version short to avoid the bug.
Thanks,
Qu
> 19 20:35:37 UTC x86_64 x86_64 x86_64 GNU/Linux
> phma@puma:~$ btrfs --version
> btrfs-progs v5.2.1
> phma@puma:~$ sudo su
> [sudo] password for phma:
> root@puma:/home/phma# btrfs fi show
> Label: none uuid: 155a20c7-2264-4923-b082-288a3c146384
> Total devices 1 FS bytes used 67.60GiB
> devid 1 size 158.00GiB used 70.02GiB path /dev/mapper/concolor-
> cougar
>
> Label: none uuid: 10c61748-efe7-4b9c-b1f7-041dc45d894b
> Total devices 1 FS bytes used 53.36GiB
> devid 1 size 127.98GiB used 56.02GiB path /dev/mapper/cougar-crypt
>
> Label: none uuid: 1f5a6f23-a7ef-46c6-92b1-84fc2f684931
> Total devices 1 FS bytes used 92.58GiB
> devid 1 size 158.00GiB used 131.00GiB path /dev/mapper/puma-cougar
>
> root@puma:/home/phma# btrfs check /dev/mapper/puma-cougar
> Opening filesystem to check...
> Checking filesystem on /dev/mapper/puma-cougar
> UUID: 1f5a6f23-a7ef-46c6-92b1-84fc2f684931
> [1/7] checking root items
> [2/7] checking extents
> incorrect local backref count on 4186230784 root 257 owner 99013 offset
> 5033684992 found 1 wanted 2097153 back 0x5589817e5ef0
> backpointer mismatch on [4186230784 188416]
> ERROR: errors found in extent allocation tree or chunk allocation
> [3/7] checking free space cache
> [4/7] checking fs roots
> root 257 inode 30648207 errors 100, file extent discount
> Found file extent holes:
> start: 0, len: 4096
> root 257 inode 30648208 errors 100, file extent discount
> Found file extent holes:
> start: 0, len: 4096
> root 257 inode 30648209 errors 100, file extent discount
> Found file extent holes:
> start: 0, len: 4096
> root 257 inode 30648210 errors 100, file extent discount
> Found file extent holes:
> start: 0, len: 4096
> root 257 inode 30648211 errors 100, file extent discount
> Found file extent holes:
> start: 0, len: 4096
> root 257 inode 30648212 errors 100, file extent discount
> Found file extent holes:
> start: 0, len: 4096
> root 257 inode 30648213 errors 100, file extent discount
> Found file extent holes:
> start: 0, len: 4096
> root 257 inode 30648214 errors 100, file extent discount
> Found file extent holes:
> start: 0, len: 4096
> root 257 inode 30648215 errors 100, file extent discount
> Found file extent holes:
> start: 0, len: 4096
> root 257 inode 30648216 errors 100, file extent discount
> Found file extent holes:
> start: 0, len: 4096
> root 257 inode 30648217 errors 100, file extent discount
> Found file extent holes:
> start: 0, len: 4096
> root 257 inode 30648218 errors 100, file extent discount
> Found file extent holes:
> start: 0, len: 4096
> root 257 inode 30648219 errors 100, file extent discount
> Found file extent holes:
> start: 0, len: 4096
> root 257 inode 30648220 errors 100, file extent discount
> Found file extent holes:
> start: 0, len: 4096
> ERROR: errors found in fs roots
> found 99403300864 bytes used, error(s) found
> total csum bytes: 96230456
> total tree bytes: 737820672
> total fs tree bytes: 534069248
> total extent tree bytes: 75481088
> btree space waste bytes: 129276390
> file data blocks allocated: 10627425239040
> referenced 68243042304
>
> Pierre
>
Attachment:
signature.asc
Description: OpenPGP digital signature
