We are using btrfs on one of our embedded devices and we got filesystem 
corruption on one of them.

This product undergo a lot of tests on our side and apparently it's the first 
it happened so it seems to be a pretty rare occurrence. However we still want 
to get to the bottom of this to ensure it doesn't happen in the future.

Some background:
- The corruption happened on kernel v5.4.72.
- On the debug device I'm on master (v5.12.0-rc7) hoping it might help to have 
all the latest patches.

Here what kernel v5.12.0-rc7 tells me when trying to mount the partition:

Apr 16 19:31:45 buildroot kernel: BTRFS info (device loop0p3): disk space 
caching is enabled
Apr 16 19:31:45 buildroot kernel: BTRFS info (device loop0p3): has skinny 
extents
Apr 16 19:31:45 buildroot kernel: BTRFS info (device loop0p3): start tree-log 
replay
Apr 16 19:31:45 buildroot kernel: BTRFS critical (device loop0p3): corrupt 
leaf: root=18446744073709551610 block=790151168 slot=5 ino=5007, inode ref 
overflow, ptr 15853 end 15861 namelen 294
Apr 16 19:31:45 buildroot kernel: BTRFS error (device loop0p3): block=790151168 
read time tree block corruption detected
Apr 16 19:31:45 buildroot kernel: BTRFS critical (device loop0p3): corrupt 
leaf: root=18446744073709551610 block=790151168 slot=5 ino=5007, inode ref 
overflow, ptr 15853 end 15861 namelen 294
Apr 16 19:31:45 buildroot kernel: BTRFS error (device loop0p3): block=790151168 
read time tree block corruption detected
Apr 16 19:31:45 buildroot kernel: BTRFS: error (device loop0p3) in 
btrfs_recover_log_trees:6246: errno=-5 IO failure (Couldn't read tree log root.)
Apr 16 19:31:45 buildroot kernel: BTRFS: error (device loop0p3) in 
btrfs_replay_log:2341: errno=-5 IO failure (Failed to recover log tree)
Apr 16 19:31:45 buildroot e512c123daaa[468]: mount: /root/mnt: can't read 
superblock on /dev/loop0p3.
Apr 16 19:31:45 buildroot kernel: BTRFS error (device loop0p3): open_ctree 
failed: -5

Any suggestions?

Reply via email to