For files smaller than 160 bytes, we can store them in spare inode space.
- It works only for unencrypted data.
- Enabled with flag inline_data
- Supported on 3.14 and beyond
We have to be sure to use fresh e2fsprog, but we went through that pain with ext4 crypto.
When enabled, we save 4K if the file is smaller than 160 bytes:
A file of 4 bytes:
No using inline data:
stat /mnt/stateful_partition/unencrypted/cache/test
File: '/mnt/stateful_partition/unencrypted/cache/test'
Size: 4 Blocks: 8 IO Block: 4096 regular file
Device: b301h/45825d Inode: 1966110 Links: 1
Using it:
stat /mnt/stateful_partition/unencrypted/cache/test2
File: '/mnt/stateful_partition/unencrypted/cache/test2'
Size: 4 Blocks: 1 IO Block: 4096 regular file
Device: b301h/45825d Inode: 1966111 Links: 1
Can be enable without reformating: newer file will get inlined when small.
Comment 1 by sonnyrao@chromium.org
, Oct 18 2017