Hi!

Summary: I am curious why "ls -l" reports 16 EiB as the size of a 
directory entry. As to what I can see the filesystem is perfectly fine.

Kernel 6.15, self compiled. 320 GiB BCacheFS on LUKS encrypted LVM. 
Checksums are xxhash. Filesystem was created recently on self compiled 
6.15-rc7 with self-compiled bcachefs tools from git tag 1.25.2. "bcachefs" 
reports 1.25.1 as version number.

I have a directory entry that according to ls -l is quite big:

drwxrwxr-x 5 martin martin 18446744073709551400 DATE DIRECTORY

Or in human readable:

drwxrwxr-x 5 martin martin 16E DATE DIRECTORY

The directory contains about 100 GiB in 14 files. All but one of them 
between 7 GiB and 8 GiB. The other one is about 800 MiB.

Scrubbing reports no error.

Running "fsck.bcachefs -n" online does not report any errors:

% fsck.bcachefs -n DEVICE
Running fsck online
bcachefs (dm-5): check_alloc_info... done
bcachefs (dm-5): check_lrus... done
bcachefs (dm-5): check_btree_backpointers... done
bcachefs (dm-5): check_backpointers_to_extents... done
bcachefs (dm-5): check_extents_to_backpointers... done
bcachefs (dm-5): check_alloc_to_lru_refs... done
bcachefs (dm-5): check_snapshot_trees... done
bcachefs (dm-5): check_snapshots... done
bcachefs (dm-5): check_subvols... done
bcachefs (dm-5): check_subvol_children... done
bcachefs (dm-5): delete_dead_snapshots... done
bcachefs (dm-5): check_indirect_extents... done
bcachefs (dm-5): check_root... done
bcachefs (dm-5): check_subvolume_structure... done
bcachefs (dm-5): check_directory_structure... done

Cannot run "fsck.bachefs" offline currently as trying to dismount gives:

umount: /MNTPOINT: target is busy.

According to lsof there is no indication on why it would be busy.

Some hours ago I was able to dismount, but then "fsck.bcachefs -n" 
reported that the device would be busy. If need be I can disable automatic 
mounting through "fstab" temporarily to check offline.

However currently I have no indication anything is wrong with the 
filesystem. Still I am curious:

Why does "ls -l" tell me the size of that directory entry is 16 EiB?

I made another directory on the device and "ls -l" reports 0 as the size 
of the directory. I copied the contents of "/usr/bin" to it, but "ls -l" 
still reports 0 as the size. Due to LZ4 compression I still have enough 
free space to duplicate the files from that directory entry with 16 EiB 
size to a test directory if need be.

I have a sub volume on the device with 2 files of 75 GiB files and 6 very 
small files. "ls -l" reports 0 as the size of the directory which holds 
the sub volume.

So what does BCacheFS return as the size of a directory entry and how can 
it be 16 EiB?

Best,
-- 
Martin



Reply via email to