Skip to content
Commit 82d5902d authored by Li Zefan's avatar Li Zefan
Browse files

Btrfs: Support reading/writing on disk free ino cache



This is similar to block group caching.

We dedicate a special inode in fs tree to save free ino cache.

At the very first time we create/delete a file after mount, the free ino
cache will be loaded from disk into memory. When the fs tree is commited,
the cache will be written back to disk.

To keep compatibility, we check the root generation against the generation
of the special inode when loading the cache, so the loading will fail
if the btrfs filesystem was mounted in an older kernel before.

Signed-off-by: default avatarLi Zefan <lizf@cn.fujitsu.com>
parent 33345d01
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment