[RndTbl] metadata *is* in the inode
trevor at tecnopolis.ca
Mon Nov 16 00:17:23 CST 2015
At the meeting last week we were discussing inodes and metadata, and where
metadata is actually stored.
I double-checked what I was saying, just to make sure, and it turns out I
was correct: many modern fs's (like ext4) store some metadata in the
inode. This is because ext4 has a 256 byte inode by default but only
needs about half of that to store "normal" inode data. Thus, "the
remaining space after the ext4_inode structure is normally used to hold
That would include capabilities (along with selinux stuff, etc), I would
assume. Of course, if your metadata is over about 100 bytes then the fs
will need to allocate other blocks for the metadata. I'm sure there's a
way to test all this with just ls, df and setcap or selinux.
Further, looks like there's a patch called "Inline data" (doesn't seem to
be in my kernel, perhaps not mature yet) that allows *data* to be put in
the empty space. That would allow tiny (100 byte) files (or even
directories with few files?) to use no blocks at all! They'd also load
super fast. I swear that I've seen that behavior on my systems, but I'm
not sure which, perhaps my XFS fs.
Perhaps if your fs is full of tons of tiny files you could gain huge
advantage by setting your inode size even higher (at fs creation time
More information about the Roundtable