The disk usage command provided by btrfs-progs reports sizes of zero bytes for some files, which seems strange because the files aren't empty. Other disk usage commands report non-zero values for the same files.
Code:
$ stat -c %s example_file.conf
383
$ du -s example_file.conf
4
$ test -s example_file.conf & echo $?
0
$ btrfs filesystem du -s example_file.conf
Total Exclusive Set shared Filename
0.00B 0.00B 0.00B example_file.conf
Similar behavior with some directories.
Code:
$ stat -c %s example_directory.d
30
$ du -s example_directory.d
4
$ btrfs filesystem du -s example_directory.d
Total Exclusive Set shared Filename
0.00B 0.00B 0.00B example_directory.d
Why is that? These files are all on a btrfs filesystem; I thought the btrfs utility would be the most accurate.