Skip to contentSkip to conversation

unresolved ref dir errors (no dir item, no inode ref, no dir index) with blob storage

DISCUSSION Ryan Taylor 1 participant 1 message Feb 18, 2024 Btrfs file system

lore
Share & tools
lore
#0 lore raw

Hello,

I have a very similar problem as described in https://www.spinics.net/lists/linux-btrfs/msg139176.html

In my case the corrupted files are:

$ ls -l ~/.config/google-chrome/Default/blob_storage/
ls: cannot access '/home/user/.config/google-chrome/Default/blob_storage/f25be63d-0f88-4541-9928-3f186fb52eb7': No such file or directory
total 0
drwx------. 1 user user 0 Dec 14 18:41 912407d6-3203-4cda-9c48-cac622eb46de
d?????????? ? ?        ?        ?            ? f25be63d-0f88-4541-9928-3f186fb52eb7

However in both cases, the affected files are of the same blob_storage/<hash> format, so maybe there is some blob storage library used by both Google Chrome and Visual Studio, which does some particular file operations that trigger a btrfs bug.

The system was installed using Fedora 37 in Nov 2022, using kernel-core-6.0.7-301.fc37.x86_64 at that time.

More details are shown below. I think these directories are likely not important but I can't find a way to delete them. Also btrfs repair seems to be widely considered dangerous. How can I resolve these errors?

$ sudo btrfs check --force -p --readonly  /dev/disk/by-label/fedora
Opening filesystem to check...
WARNING: filesystem mounted, continuing because of --force
Checking filesystem on /dev/disk/by-label/fedora
UUID: 8e5930c8-d66c-4364-9e92-a57a4ef84111
[1/7] checking root items                      (0:00:01 elapsed, 838399 items checked)
[2/7] checking extents                         (0:00:04 elapsed, 62160 items checked)
[3/7] checking free space tree                 (0:00:00 elapsed, 241 items checked)
root 257 inode 3993875 errors 1, no inode item (0:00:01 elapsed, 23864 items checked)
	unresolved ref dir 50991 index 275 namelen 36 name f25be63d-0f88-4541-9928-3f186fb52eb7 filetype 2 errors 5, no dir item, no inode
ref
	unresolved ref dir 50991 index 275 namelen 36 name fcb32027-1da1-4806-9cc1-55b6d9813ba7 filetype 2 errors 2, no dir index
[4/7] checking fs roots                        (0:00:02 elapsed, 41289 items checked)
ERROR: errors found in fs roots
found 219760615424 bytes used, error(s) found
total csum bytes: 213559004
total tree bytes: 1018183680
total fs tree bytes: 678920192
total extent tree bytes: 81362944
btree space waste bytes: 199739668
file data blocks allocated: 250361425920
 referenced 226932035584
$ sudo btrfs fi show
Label: 'fedora'  uuid: 8#######-####-####-####-############
	Total devices 2 FS bytes used 204.67GiB
	devid    1 size 449.98GiB used 239.03GiB path /dev/mapper/luks-1#######-####-####-####-############
	devid    2 size 449.98GiB used 239.03GiB path /dev/mapper/luks-2#######-####-####-####-############
$ sudo btrfs fi df /home
Data, RAID1: total=236.00GiB, used=203.72GiB
System, RAID1: total=32.00MiB, used=64.00KiB
Metadata, RAID1: total=3.00GiB, used=970.97MiB
GlobalReserve, single: total=323.70MiB, used=0.00B
$ uname -a
Linux server 6.7.4-100.fc38.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Feb  5 22:19:06 UTC 2024 x86_64 GNU/Linux
$ btrfs --version
btrfs-progs v6.7

Thanks!
-rt