如果我正确阅读了 ext4 文档,从 Linux 3.8 开始,对于非常小的文件,应该可以将数据直接存储在 inode 中。
我期望这样一个文件的大小为 0 块,但事实并非如此。
# creating a small file
printf "abcde" > small_file
# checking size of file in bytes
stat --printf='%s\n' small_file
5
# number of 512-byte blocks used by file
stat --printf='%b\n' small_file
8
Run Code Online (Sandbox Code Playgroud)
我希望这里的最后一个数字是 0。我错过了什么吗?