Article 55VZ1 Btrfs disk usage utility reports sizes of 0 bytes for some non-empty files

Btrfs disk usage utility reports sizes of 0 bytes for some non-empty files

by
DoorDaesh
from LinuxQuestions.org on (#55VZ1)
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.confSimilar 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.dWhy is that? These files are all on a btrfs filesystem; I thought the btrfs utility would be the most accurate.latest?d=yIl2AUoC8zA latest?i=sWmZ_2ekaiA:51q4GsqhzyM:F7zBnMy latest?i=sWmZ_2ekaiA:51q4GsqhzyM:V_sGLiP latest?d=qj6IDK7rITs latest?i=sWmZ_2ekaiA:51q4GsqhzyM:gIN9vFwsWmZ_2ekaiA
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments